From 1f1da2d77d321f52de3ce6462fedb1d797edbbe8 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 29 Jul 2023 11:34:45 +0100 Subject: [PATCH] Better manage user sudo --- tasks/packages.yml | 2 +- tasks/user.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tasks/packages.yml b/tasks/packages.yml index cb48b8e..2785fba 100644 --- a/tasks/packages.yml +++ b/tasks/packages.yml @@ -37,7 +37,7 @@ line: "aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman" create: true validate: visudo -cf %s - mode: 0644 + mode: 0640 changed_when: false - name: Install chaotic AUR diff --git a/tasks/user.yml b/tasks/user.yml index ec015fd..452c3e8 100644 --- a/tasks/user.yml +++ b/tasks/user.yml @@ -21,5 +21,8 @@ - name: Give user sudo access lineinfile: - path: /etc/sudoers + path: /etc/sudoers.d/00_jake line: "{{ user }} ALL=(ALL) ALL" + create: true + validate: visudo -cf %s + mode: 0640