From 919f256d3f29593ae81631a11508de842945751e Mon Sep 17 00:00:00 2001 From: gabo Date: Sun, 16 Jun 2024 15:05:36 +0200 Subject: [PATCH] [sudoers] support add debian12+ --- roles/sudo/tasks/main.yml | 2 +- .../templates/{sudoers.bullseye.j2 => sudoers.bullseye_plus.j2} | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename roles/sudo/templates/{sudoers.bullseye.j2 => sudoers.bullseye_plus.j2} (88%) 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