Configure passwordless sudo for wheel group.
This commit is contained in:
parent
ade7fd30f4
commit
a6e60cef85
@ -1 +1 @@
|
|||||||
os_flavor: "FreeBSD"
|
os_flavor: "freebsd"
|
||||||
|
1
ansible/roles/sudo/files/wheel
Normal file
1
ansible/roles/sudo/files/wheel
Normal file
@ -0,0 +1 @@
|
|||||||
|
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
|
8
ansible/roles/sudo/tasks/freebsd.yaml
Normal file
8
ansible/roles/sudo/tasks/freebsd.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
- name: Configure sudoers
|
||||||
|
copy:
|
||||||
|
src: files/wheel
|
||||||
|
dest: /usr/local/etc/sudoers.d/wheel
|
||||||
|
mode: 0440
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
validate: "visudo -cf %s"
|
8
ansible/roles/sudo/tasks/linux.yaml
Normal file
8
ansible/roles/sudo/tasks/linux.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
- name: Configure sudoers
|
||||||
|
copy:
|
||||||
|
src: files/wheel
|
||||||
|
dest: /etc/sudoers.d/wheel
|
||||||
|
mode: 0440
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
validate: "visudo -cf %s"
|
@ -3,3 +3,9 @@
|
|||||||
name:
|
name:
|
||||||
- sudo
|
- sudo
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- include: tasks/freebsd.yaml
|
||||||
|
when: 'os_flavor == "freebsd"'
|
||||||
|
|
||||||
|
- include: tasks/linux.yaml
|
||||||
|
when: 'os_flavor == "linux"'
|
||||||
|
Loading…
Reference in New Issue
Block a user