1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

Allow for user gitea to be added to a list of secondary groups via 'gitea_groups'

This commit is contained in:
mar1ad 2022-06-05 10:12:17 +02:00
parent 5dca8875bb
commit 843da0ca2b
3 changed files with 5 additions and 2 deletions

View file

@ -49,7 +49,8 @@ Either you define exactly which release you install. Or you use the option ``lat
### gitea in the linux world
| variable name | default value | description |
| ------------- | ------------- | ----------- |
| `gitea_group` | `gitea` | UNIX group used by Gitea |
| `gitea_group` | `gitea` | Primary UNIX group used by Gitea |
| `gitea_groups` | null | Optionally a list of secondary UNIX groups used by Gitea |
| `gitea_home` | `/var/lib/gitea` | Base directory to work |
| `gitea_shell` | `/bin/false` | UNIX shell used by gitea. Set it to `/bin/bash` if you don't use the gitea built-in ssh server. |
| `gitea_systemd_cap_net_bind_service` | `false` | Adds `AmbientCapabilities=CAP_NET_BIND_SERVICE` to systemd service file |

View file

@ -11,6 +11,7 @@ submodules_versioncheck: false
# gitea in the linux world
gitea_group: 'gitea'
# gitea_groups: [] # Optional a list of groups user gitea will be added to
gitea_home: '/var/lib/gitea'
gitea_shell: '/bin/false'
gitea_systemd_cap_net_bind_service: false

View file

@ -16,7 +16,8 @@
ansible.builtin.user:
name: "{{ gitea_user }}"
comment: "Gitea user"
groups: "{{ gitea_group }}"
group: "{{ gitea_group }}"
groups: "{{ gitea_groups | default(omit) }}"
home: "{{ gitea_home }}"
shell: "{{ gitea_shell }}"
system: true