Rename the role entrypoints to main.yaml
This commit is contained in:
1 parent
c40b9a8e20
commit
0882eb0dfa
5 files changed
No files matched your search
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Ensure group wheel exists
|
||||
ansible.builtin.group:
|
||||
name: wheel
|
||||
state: present
|
||||
|
||||
- name: Allow wheel group to have passwordless sudo
|
||||
ansible.builtin.copy:
|
||||
# A block scalar, so the file ends with a newline. With an inline string
|
||||
# there is no trailing terminator and visudo rejects it with
|
||||
# "syntax error: missing line terminator at end of file".
|
||||
content: |
|
||||
%wheel ALL=(ALL) NOPASSWD: ALL
|
||||
dest: /etc/sudoers.d/wheel
|
||||
mode: "0440"
|
||||
validate: "/usr/sbin/visudo -cf %s"
|
||||
|
||||
- name: Adding user to group wheel
|
||||
ansible.builtin.user:
|
||||
name: "{{ user }}"
|
||||
groups: wheel
|
||||
append: true
|
||||
Reference in new issue
Block a user