Configure passwordless sudo for wheel group.

This commit is contained in:
Tom Alexander 2022-10-09 23:14:55 -04:00
parent ade7fd30f4
commit a6e60cef85
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
5 changed files with 24 additions and 1 deletions

View File

@ -1 +1 @@
os_flavor: "FreeBSD" os_flavor: "freebsd"

View File

@ -0,0 +1 @@
%wheel ALL=(ALL:ALL) NOPASSWD: ALL

View 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"

View 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"

View File

@ -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"'