From: Oleg Broytman Date: Mon, 4 Dec 2023 01:29:26 +0000 (+0300) Subject: Feat(roles/sudo): Disable `.sudo_as_admin_successful` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=93b859e547bd0f3286b4c3d82338668ebe3b6139;p=ansible.git Feat(roles/sudo): Disable `.sudo_as_admin_successful` --- diff --git a/playbooks/roles/sudo/tasks/main.yaml b/playbooks/roles/sudo/tasks/main.yaml index 0c87707..ee444a5 100644 --- a/playbooks/roles/sudo/tasks/main.yaml +++ b/playbooks/roles/sudo/tasks/main.yaml @@ -19,7 +19,9 @@ - name: Allow passwordless operations for phd become: true copy: - content: 'phd ALL=(ALL:ALL) NOPASSWD: ALL' + content: | + Defaults !admin_flag + phd ALL=(ALL:ALL) NOPASSWD: ALL dest: /etc/sudoers.d/phd owner: root group: "{% if ansible_facts.os_family == 'Debian' %}sudo{% elif ansible_facts.os_family == 'RedHat' %}root{% endif %}"