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