switch to using sudoers module
This commit is contained in:
parent
442f4c71c2
commit
e191d1a5d5
@ -18,10 +18,10 @@
|
|||||||
create_home: true
|
create_home: true
|
||||||
|
|
||||||
- name: "Add user to sudoers"
|
- name: "Add user to sudoers"
|
||||||
ansible.builtin.copy:
|
community.general.sudoers:
|
||||||
dest: "/etc/sudoers.d/{{ provision_ansible_user_name }}"
|
name: "{{ provision_ansible_user_name }}"
|
||||||
owner: root
|
user: "{{ provision_ansible_user_name }}"
|
||||||
group: root
|
commands: ALL
|
||||||
mode: 0640
|
nopassword: true
|
||||||
content: "{{ provision_ansible_user_name }} ALL=(ALL) NOPASSWD: ALL"
|
setenv: true
|
||||||
when: provision_ansible_user_sudoer
|
when: provision_ansible_user_sudoer
|
||||||
|
Loading…
Reference in New Issue
Block a user