Switching to sudoers config files

This commit is contained in:
Tyler Hale 2024-07-25 17:54:48 -06:00
parent 49c2cf296b
commit 8de7d0dfce
Signed by: Tyler
GPG key ID: C7CC4B910D88EF96
3 changed files with 17 additions and 15 deletions

View file

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

View file

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

View file

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