Use sudoers module
This commit is contained in:
parent
93c0101ca4
commit
cb561805d6
|
@ -17,10 +17,11 @@
|
||||||
exclusive: true
|
exclusive: true
|
||||||
loop: "{{ users }}"
|
loop: "{{ users }}"
|
||||||
|
|
||||||
- name: Allow passwordless sudo to 'sudo' group
|
- name: Allow passwordless sudo
|
||||||
ansible.builtin.lineinfile:
|
community.general.sudoers:
|
||||||
path: /etc/sudoers
|
name: passwordless
|
||||||
regexp: '^%sudo ALL='
|
group: sudo
|
||||||
line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL'
|
host: ALL
|
||||||
validate: /usr/sbin/visudo -cf %s
|
commands: ALL
|
||||||
|
nopassword: true
|
||||||
state: present
|
state: present
|
||||||
|
|
Loading…
Reference in a new issue