Switching to sudoers config files
This commit is contained in:
parent
49c2cf296b
commit
8de7d0dfce
3 changed files with 17 additions and 15 deletions
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
# file: roles/base/tasks/core_sudo.yml
|
# file: roles/base/tasks/core_sudo.yml
|
||||||
|
|
||||||
- name: Enabled passwordless for wheel group
|
- name: Configure passwordless for wheel group
|
||||||
lineinfile:
|
template:
|
||||||
path: /etc/sudoers
|
src: "%wheel.j2"
|
||||||
state: present
|
dest: "/etc/sudoers.d/%wheel"
|
||||||
regexp: '^%wheel'
|
owner: root
|
||||||
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
|
group: root
|
||||||
validate: 'visudo -cf %s'
|
mode: '0440'
|
||||||
|
|
||||||
- name: Enabled passwordless for sudo group
|
- name: Configure passwordless for sudo group
|
||||||
lineinfile:
|
template:
|
||||||
path: /etc/sudoers
|
src: "%sudo.j2"
|
||||||
state: present
|
dest: "/etc/sudoers.d/%sudo"
|
||||||
regexp: '^%sudo'
|
owner: root
|
||||||
line: '%sudo ALL=(ALL:ALL) NOPASSWD: ALL'
|
group: root
|
||||||
validate: 'visudo -cf %s'
|
mode: '0440'
|
||||||
|
|
1
roles/base/templates/%sudo.j2
Normal file
1
roles/base/templates/%sudo.j2
Normal file
|
@ -0,0 +1 @@
|
||||||
|
%sudo ALL=(ALL) NOPASSWD: ALL
|
1
roles/base/templates/%wheel.j2
Normal file
1
roles/base/templates/%wheel.j2
Normal file
|
@ -0,0 +1 @@
|
||||||
|
%wheel ALL=(ALL) NOPASSWD: ALL
|
Loading…
Reference in a new issue