Skip to content

Commit

Permalink
Merge pull request #80 from mar1ad/gitea_groups
Browse files Browse the repository at this point in the history
Allow for user gitea to be added to a list of secondary groups
  • Loading branch information
DO1JLR authored Jun 8, 2022
2 parents 5dca887 + 843da0c commit 586d277
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tasks/create_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 586d277

Please sign in to comment.