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