Adding step to set NOPASSWD for the wheel group

This commit is contained in:
Tyler Hale 2021-09-09 15:18:11 -06:00
parent 7fdf53e1ad
commit 4a7e0f7d96
2 changed files with 18 additions and 0 deletions

View file

@ -35,6 +35,14 @@
tags: tags:
- ssh - ssh
- name: "*** SUDO Configuration ***"
include_tasks:
file: core_sudo.yml
apply:
tags: sudo
tags:
- sudo
- name: "*** Generate Self-Signed Cert ***" - name: "*** Generate Self-Signed Cert ***"
include_tasks: include_tasks:
file: core_cert.yml file: core_cert.yml

View file

@ -0,0 +1,10 @@
---
# file: roles/base/tasks/core_sudo.yml
- name: Enabled passwordless sudo
lineinfile:
path: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
validate: 'visudo -cf %s'