Use ansible_facts.xxx instead of ansible_xxx. (#980)

This commit is contained in:
Felix Fontein
2026-02-07 16:12:21 +01:00
committed by GitHub
parent e91f8ec520
commit b5a9a41913
23 changed files with 57 additions and 57 deletions

View File

@@ -8,7 +8,7 @@
# and should not be used as examples of how to write Ansible roles #
####################################################################
- name: make sure we have the ansible_os_family and ansible_distribution_version facts
- name: make sure we have the ansible_facts.os_family and ansible_facts.distribution_version facts
ansible.builtin.setup:
gather_subset: distribution
when: ansible_facts == {}
@@ -16,5 +16,5 @@
- ansible.builtin.include_tasks: "{{ lookup('first_found', files) }}"
vars:
files:
- "{{ ansible_os_family | lower }}.yml"
- "{{ ansible_facts.os_family | lower }}.yml"
- "default.yml"