chore: use ansible_facts
All checks were successful
ci/woodpecker/push/linting Pipeline was successful

This commit is contained in:
Simon Cornet 2026-05-20 09:00:16 +02:00
commit ad68a72478
3 changed files with 16 additions and 15 deletions

View file

@ -1,11 +1,12 @@
Types: deb
URIs: {{ apt_repository_main }}
Suites: {{ ansible_distribution_release }} {{ ansible_distribution_release }}-updates {{ ansible_distribution_release }}-backports
Suites: {{ ansible_facts['distribution_release'] }} {{ ansible_facts['distribution_release'] }}-updates {{
ansible_facts['distribution_release'] }}-backports
Components: main restricted {% if apt_enable_universe == True %}universe{% endif %} {% if apt_enable_multiverse == True %}multiverse{% endif %}
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: {{ apt_repository_security }}
Suites: {{ ansible_distribution_release }}-security
Suites: {{ ansible_facts['distribution_release'] }}-security
Components: main restricted {% if apt_enable_universe == True %}universe{% endif %} {% if apt_enable_multiverse == True %}multiverse{% endif %}
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

View file

@ -1,21 +1,21 @@
# main + restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }} main restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-updates main restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-security main restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-backports main restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }} main restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-updates main restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-security main restricted
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-backports main restricted
{% if apt_enable_universe == True %}
# universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }} universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-updates universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-security universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-backports universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }} universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-updates universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-security universe
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-backports universe
{% endif %}
{% if apt_enable_multiverse == True %}
# multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }} multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-updates multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-security multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_distribution_release }}-backports multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }} multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-updates multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-security multiverse
deb [ arch=amd64 ] {{ apt_repository }} {{ ansible_facts['distribution_release'] }}-backports multiverse
{% endif %}

View file

@ -29,7 +29,7 @@ Compression no
AllowTcpForwarding yes
AllowAgentForwarding yes
PrintMotd yes
{% if ansible_distribution == 'Debian' %}
{% if ansible_facts['distribution'] == 'Debian' %}
UsePAM yes
PrintLastLog no
{% endif %}