File tree Expand file tree Collapse file tree 8 files changed +16
-16
lines changed
Expand file tree Collapse file tree 8 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 156156
157157- name : Configure remediation
158158 when :
159- - ansible_distribution_version is version("8.4", ">=")
159+ - ansible_facts['distribution_version'] is version("8.4", ">=")
160160 - rhc_insights.remediation | d("present") == "present"
161161 block :
162162 - name : Ensure worker and ansible packages are installed
Original file line number Diff line number Diff line change 66- name : Handle insights unregistration
77 include_tasks : insights-client-unregistration.yml
88 when :
9- - ansible_distribution == "RedHat"
9+ - ansible_facts['distribution'] == "RedHat"
1010 - >-
1111 rhc_insights.state | d("present") == "absent"
1212 or rhc_state | d("present") in ["absent", "reconnect"]
1818- name : Handle insights registration
1919 include_tasks : insights-client.yml
2020 when :
21- - ansible_distribution == "RedHat"
21+ - ansible_facts['distribution'] == "RedHat"
2222 - rhc_insights.state | d("present") == "present"
2323 - rhc_state | d("present") in ["present", "reconnect"]
Original file line number Diff line number Diff line change 2121- name : Check if insights-packages are installed
2222 package_facts :
2323 when :
24- - ansible_distribution == "RedHat"
24+ - ansible_facts['distribution'] == "RedHat"
2525 - >-
2626 rhc_insights.state | d("present") == "absent"
2727 or rhc_state | d("present") in ["absent", "reconnect"]
Original file line number Diff line number Diff line change 5555 - --publish
5656 - 8080:8080
5757 - " {{ '--privileged'
58- if (ansible_distribution in ['CentOS', 'RedHat']
59- and ansible_distribution_major_version | int < 8)
58+ if (ansible_facts['distribution'] in ['CentOS', 'RedHat']
59+ and ansible_facts['distribution_major_version'] | int < 8)
6060 else '' }}"
6161 - ghcr.io/candlepin/candlepin-unofficial
6262 command :
Original file line number Diff line number Diff line change 8686 - name : Check the enabled environments
8787 when :
8888 - >-
89- ansible_distribution not in ["CentOS", "RedHat"]
90- or (ansible_distribution == "CentOS"
91- and ansible_distribution_major_version | int >= 8)
92- or (ansible_distribution_version is version("8.6", ">="))
89+ ansible_facts["distribution"] not in ["CentOS", "RedHat"]
90+ or (ansible_facts["distribution"] == "CentOS"
91+ and ansible_facts["distribution_major_version"] | int >= 8)
92+ or (ansible_facts["distribution_version"] is version("8.6", ">="))
9393 block :
9494 - name : Get enabled environments
9595 include_tasks : tasks/list_environments.yml
Original file line number Diff line number Diff line change 1818 - name : Skip if the RHEL version is older than 8.4
1919 meta : end_play
2020 when :
21- - ansible_distribution_version is version("8.4", "<")
21+ - ansible_facts["distribution_version"] is version("8.4", "<")
2222
2323 - name : Test remediation
2424 block :
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ __rhc_rh_distros:
1414__rhc_rh_distros_fedora : " {{ __rhc_rh_distros + ['Fedora'] }}"
1515
1616# Use this in conditionals to check if distro is Red Hat or clone
17- __rhc_is_rh_distro : " {{ ansible_distribution in __rhc_rh_distros }}"
17+ __rhc_is_rh_distro : " {{ ansible_facts['distribution'] in __rhc_rh_distros }}"
1818
1919# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
20- __rhc_is_rh_distro_fedora : " {{ ansible_distribution in __rhc_rh_distros_fedora }}"
20+ __rhc_is_rh_distro_fedora : " {{ ansible_facts['distribution'] in __rhc_rh_distros_fedora }}"
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ __rhc_insights_tags: "/etc/insights-client/tags.yaml"
2929# to Insights, used for remediations; starting from EL 10 the service is the
3030# upstream one, and no more the downstream-branded one
3131__rhc_yggdrasil_systemd_service : " {{ 'yggdrasil'
32- if (ansible_distribution_major_version | int >= 10)
32+ if (ansible_facts['distribution_major_version'] | int >= 10)
3333 else 'rhcd' }}"
3434
3535# BEGIN - DO NOT EDIT THIS BLOCK - rh distros variables
@@ -44,8 +44,8 @@ __rhc_rh_distros:
4444__rhc_rh_distros_fedora : " {{ __rhc_rh_distros + ['Fedora'] }}"
4545
4646# Use this in conditionals to check if distro is Red Hat or clone
47- __rhc_is_rh_distro : " {{ ansible_distribution in __rhc_rh_distros }}"
47+ __rhc_is_rh_distro : " {{ ansible_facts['distribution'] in __rhc_rh_distros }}"
4848
4949# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
50- __rhc_is_rh_distro_fedora : " {{ ansible_distribution in __rhc_rh_distros_fedora }}"
50+ __rhc_is_rh_distro_fedora : " {{ ansible_facts['distribution'] in __rhc_rh_distros_fedora }}"
5151# END - DO NOT EDIT THIS BLOCK - rh distros variables
You can’t perform that action at this time.
0 commit comments