Skip to content

Commit

Permalink
feat: update sudoers config
Browse files Browse the repository at this point in the history
  • Loading branch information
victorely committed Jan 2, 2025
1 parent 2ada65d commit d22e1a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
- sudo

- name: Configure sudoers file for each user
lineinfile:
blockinfile:
dest: /etc/sudoers
state: present
regexp: '^{{ item.user }} ALL='
line: "{{ item.user }} ALL=(ALL:ALL) {{ 'NOPASSWD: ALL' if not item.sudo_password and basic_passwordless_sudo else 'ALL' }}"
block: |
{{ item.user }} ALL=(ALL:ALL) {{ 'NOPASSWD: ALL' if not item.sudo_password and basic_passwordless_sudo else 'ALL' }}
validate: visudo -cf %s
loop: "{{ basic_sudo_users }}"

Expand Down

0 comments on commit d22e1a3

Please sign in to comment.