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

Merge pull request #80 from mar1ad/gitea_groups

Allow for user gitea to be added to a list of secondary groups
This commit is contained in:
L3D 2022-06-08 15:44:20 +02:00 committed by GitHub
commit 586d277985
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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