Add legacy fact setting

When we disable inject facts by default, there were some additional
roles that we missed (ipaclient).  We can just set the legacy facts to
prevent issues with missing distribution var updates.

Change-Id: Ib488a6573c035fc8288a4b24461af56d40416c5d
Related-Bug: #1919064
(cherry picked from commit d8408ebb86)
This commit is contained in:
Alex Schultz 2021-03-15 06:38:08 -06:00
parent e30b34a1ce
commit 90a04d94e5
1 changed files with 17 additions and 0 deletions

View File

@ -18,6 +18,15 @@
any_errors_fatal: true any_errors_fatal: true
ignore_unreachable: false ignore_unreachable: false
become: false become: false
tasks:
- name: Set legacy facts
set_fact:
ansible_distribution: "{{ ansible_facts['distribution'] }}"
ansible_distribution_major_version: "{{ ansible_facts['distribution_major_version'] }}"
ansible_distribution_release: "{{ ansible_facts['distribution_release'] }}"
ansible_distribution_version: "{{ ansible_facts['distribution_version'] }}"
ansible_os_family: "{{ ansible_facts['os_family'] }}"
tags: tags:
- facts - facts
@ -31,6 +40,14 @@
# we will simply ignore unreachable nodes and errors, and let the # we will simply ignore unreachable nodes and errors, and let the
# Ansible reports the failure in the next plays. # Ansible reports the failure in the next plays.
ignore_unreachable: true ignore_unreachable: true
tasks:
- name: Set legacy facts
set_fact:
ansible_distribution: "{{ ansible_facts['distribution'] }}"
ansible_distribution_major_version: "{{ ansible_facts['distribution_major_version'] }}"
ansible_distribution_release: "{{ ansible_facts['distribution_release'] }}"
ansible_distribution_version: "{{ ansible_facts['distribution_version'] }}"
ansible_os_family: "{{ ansible_facts['os_family'] }}"
tags: tags:
- facts - facts