diff --git a/roles/sudo/tasks/main.yml b/roles/sudo/tasks/main.yml index 487a6587..360770a8 100644 --- a/roles/sudo/tasks/main.yml +++ b/roles/sudo/tasks/main.yml @@ -7,5 +7,5 @@ loop: - src: sudoers.d/custom_passprompt - src: sudoers.d/group_privilege - - src: "sudoers.{{ ansible_distribution_release }}" + - src: "sudoers.{{ ansible_distribution_release if ansible_distribution_major_version | int < 11 else 'bullseye_plus' }}" dst: "sudoers" diff --git a/roles/sudo/templates/sudoers.bullseye.j2 b/roles/sudo/templates/sudoers.bullseye_plus.j2 similarity index 88% rename from roles/sudo/templates/sudoers.bullseye.j2 rename to roles/sudo/templates/sudoers.bullseye_plus.j2 index 9f018b88..7b1f8971 100644 --- a/roles/sudo/templates/sudoers.bullseye.j2 +++ b/roles/sudo/templates/sudoers.bullseye_plus.j2 @@ -24,4 +24,5 @@ USERS ALL=(root:ALL) NOPASSWD:/usr/sbin/qm list {% endif %} # See sudoers(5) for more information on "@include" directives: +{# Ce template sert pour les versions de debian bullseye et plus (d’ou son nom) #} @includedir /etc/sudoers.d