Replace injected Ansible fact variables in bootstrap_os role (#13264)

* Replace injected Ansible fact variables in bootstrap_os role

* Restore stale setup task in opensuse role
This commit is contained in:
Nikhil Kumar
2026-06-19 11:44:49 +05:30
committed by GitHub
parent a553d48c73
commit 9f7ea6632c
2 changed files with 14 additions and 14 deletions

View File

@@ -6,7 +6,7 @@
- name: Add proxy to yum.conf or dnf.conf if http_proxy is defined
community.general.ini_file:
path: "{{ ((ansible_distribution_major_version | int) < 8) | ternary('/etc/yum.conf', '/etc/dnf/dnf.conf') }}"
path: "{{ ((ansible_facts['distribution_major_version'] | int) < 8) | ternary('/etc/yum.conf', '/etc/dnf/dnf.conf') }}"
section: main
option: proxy
value: "{{ http_proxy | default(omit) }}"
@@ -71,7 +71,7 @@
- "rhel-8-for-*-appstream-rpms"
state: "{{ 'enabled' if (rhel_enable_repos | bool) else 'disabled' }}"
when:
- ansible_distribution_major_version == "8"
- ansible_facts['distribution_major_version'] == "8"
- (not rh_subscription_status.changed) or (rh_subscription_username is defined) or (rh_subscription_org_id is defined)
- name: Check presence of fastestmirror.conf