diff --git a/roles/debian-apt-sources/templates/apt/sources.list.j2 b/roles/debian-apt-sources/templates/apt/sources.list.j2 index 8eb3d4324ffdc973b032a13a01dece67a2093a2d..8b54c76962af71a25a17e7273e16b178652cce80 100644 --- a/roles/debian-apt-sources/templates/apt/sources.list.j2 +++ b/roles/debian-apt-sources/templates/apt/sources.list.j2 @@ -1,24 +1,24 @@ {{ ansible_header | comment }} -{% if ansible_lsb.id == "Debian" %} -{% if ansible_lsb.codename != "bullseye" %} +{% if ansible_distribution == "Debian" %} +{% if ansible_distribution_release != "bullseye" %} {# Debian security does not exist yet for bullseye #} # Mises à jour de sécurité -deb {{ debian_mirror }}-security {{ ansible_lsb.codename }}/updates {{ debian_components }} +deb {{ debian_mirror }}-security {{ ansible_distribution_release }}/updates {{ debian_components }} {% endif %} # Dépôt classique -deb {{ debian_mirror }} {{ ansible_lsb.codename }} {{ debian_components }} +deb {{ debian_mirror }} {{ ansible_distribution_release }} {{ debian_components }} # Dépôt pour mises à jour fréquentes (volatile) -deb {{ debian_mirror }} {{ ansible_lsb.codename }}-updates {{ debian_components }} -{% elif ansible_lsb.id == "Ubuntu" %} +deb {{ debian_mirror }} {{ ansible_distribution_release }}-updates {{ debian_components }} +{% elif ansible_distribution == "Ubuntu" %} # Mises à jour de sécurité -deb {{ ubuntu_mirror }} {{ ansible_lsb.codename }}-security {{ ubuntu_components }} +deb {{ ubuntu_mirror }} {{ ansible_distribution_release }}-security {{ ubuntu_components }} # Dépôt classique -deb {{ ubuntu_mirror }} {{ ansible_lsb.codename }} {{ ubuntu_components }} +deb {{ ubuntu_mirror }} {{ ansible_distribution_release }} {{ ubuntu_components }} # Dépôt pour mises à jour fréquentes (volatile) -deb {{ ubuntu_mirror }} {{ ansible_lsb.codename }}-updates {{ ubuntu_components }} +deb {{ ubuntu_mirror }} {{ ansible_distribution_release }}-updates {{ ubuntu_components }} {% endif %}