Set more specific sudoers permissions for git user
This commit is contained in:
parent
e0cfde4c9f
commit
808a40ac68
2 changed files with 4 additions and 2 deletions
|
@ -46,8 +46,8 @@
|
|||
|
||||
- name: Set sudoer permissions to git user
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
content: 'git ALL=(root) NOPASSWD:/usr/bin/systemctl'
|
||||
ansible.builtin.template:
|
||||
src: sudoers.d/git.j2
|
||||
dest: /etc/sudoers.d/git
|
||||
owner: root
|
||||
group: root
|
||||
|
|
2
roles/forgejo/templates/sudoers.d/git.j2
Normal file
2
roles/forgejo/templates/sudoers.d/git.j2
Normal file
|
@ -0,0 +1,2 @@
|
|||
git ALL=(root) NOPASSWD:/usr/bin/systemctl stop forgejo.service
|
||||
git ALL=(root) NOPASSWD:/usr/bin/systemctl restart forgejo.service
|
Loading…
Reference in a new issue