Skip to content

Commit

Permalink
feat: Sudo group for arch
Browse files Browse the repository at this point in the history
  • Loading branch information
lholota committed Jan 13, 2025
1 parent 5f91964 commit dc204af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/users/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
name: sudo
state: present

- name: Configure sudo group
ansible.builtin.include_tasks:
file: ./sudo-group.yml

- name: Create admin users
ansible.builtin.include_tasks:
file: ./admin-user.yml
Expand Down
10 changes: 10 additions & 0 deletions roles/users/tasks/sudo-group.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- name: Create sudo group
ansible.builtin.group:
name: sudo

- name: Grant permissions to sudo for all members of the sudo group
ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
line: "# %sudo ALL=(ALL:ALL) ALL"
validate: 'visudo -cf %s'

Check failure on line 10 in roles/users/tasks/sudo-group.yml

View workflow job for this annotation

GitHub Actions / build

yaml[new-line-at-end-of-file]

No new line character at the end of file

0 comments on commit dc204af

Please sign in to comment.