Ansible-Linux_Base/roles/base/tasks/core_sudo.yml

18 lines
440 B
YAML

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