chore: migrate bare ansible_* facts to ansible_facts[] syntax
All checks were successful
ci/woodpecker/push/linting Pipeline was successful

This commit is contained in:
Simon Cornet 2026-05-19 09:19:07 +02:00
commit ca0d331181
3 changed files with 9 additions and 9 deletions

View file

@ -3,8 +3,8 @@
# these set of tasks will upgrade Alpine from v3.22 to v3.23
- name: "upgrade to alpine v3.23"
when:
- "ansible_distribution == 'Alpine'"
- "'3.22' in ansible_distribution_version"
- "ansible_facts['distribution'] == 'Alpine'"
- "'3.22' in ansible_facts['distribution_version']"
block:
# change repositories
@ -52,7 +52,7 @@
ansible.builtin.command:
cmd: "fstrim /"
changed_when: false
when: "ansible_virtualization_type == 'kvm'"
when: "ansible_facts['virtualization_type'] == 'kvm'"
# all is done
- name: "all is done"

View file

@ -9,7 +9,7 @@
# install updates - alpine
- name: "install updates - alpine"
when: 'ansible_os_family == "Alpine"'
when: 'ansible_facts["os_family"] == "Alpine"'
block:
# install updates
@ -27,7 +27,7 @@
# install updates - debian
- name: "install updates - debian"
when: 'ansible_os_family == "Debian"'
when: 'ansible_facts["os_family"] == "Debian"'
block:
# install updates
@ -46,7 +46,7 @@
# install updates - rhel
- name: "install updates - rhel"
when: 'ansible_os_family == "RedHat"'
when: 'ansible_facts["os_family"] == "RedHat"'
block:
# install updates
@ -70,7 +70,7 @@
# install updates - suse
- name: "install updates"
when: 'ansible_os_family == "Suse"'
when: 'ansible_facts["os_family"] == "Suse"'
block:
# install updates