Open
Description
Hello :)
Both work. No need to add a duplicate? Also nice to not modify sudoers.conf if not needed
- name: Ensure /etc/sudoers.d is scanned by sudo
lineinfile:
dest: '/etc/sudoers'
regexp: '#includedir\s+/etc/sudoers.d'
line: '#includedir /etc/sudoers.d'
when: admin_sudoers|bool
https://www.sudo.ws/docs/man/sudoers.man/#Including_other_files_from_within_sudoers
TASK [ansible-role-users : Ensure /etc/sudoers.d is scanned by sudo] *******************************
--- before: /etc/sudoers (content)
+++ after: /etc/sudoers (content)
@@ -52,3 +52,4 @@
# See sudoers(5) for more information on "@include" directives:
@includedir /etc/sudoers.d
+#includedir /etc/sudoers.d
Metadata
Metadata
Assignees
Labels
No labels