Put service user into own sudo file

SUSE Tumbleweed doesn't have a /etc/sudoers anymore - and it's the clean
way to do it
This commit is contained in:
Sven Velt 2024-07-02 21:31:19 +02:00
parent e286662efc
commit c6cb78ce6f

View file

@ -220,9 +220,10 @@
- name: Add sudo line for service
lineinfile:
path: /etc/sudoers
path: "/etc/sudoers.d/{{ service_username }}"
regexp: "^service"
line: "{{ service_username }} ALL=(ALL:ALL) NOPASSWD: ALL"
create: yes
backup: yes