This commit is contained in:
Michael Grote 2024-10-23 21:39:46 +02:00
parent 65c7739f71
commit e1fce955e4

View file

@ -42,7 +42,7 @@
name: "users-sudo-{{ item.username }}" name: "users-sudo-{{ item.username }}"
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
user: "{{ item.username }}" user: "{{ item.username }}"
commands: ALL commands: ALL=(ALL)
nopassword: "{{ item.allow_passwordless_sudo }}" nopassword: "{{ item.allow_passwordless_sudo }}"
loop: '{{ users }}' loop: '{{ users }}'
when: item.allow_sudo|default(false) and item.allow_sudo is defined when: item.allow_sudo|default(false) and item.allow_sudo is defined