test: change condition for greenboot checks in ansible playbooks
Both CentOS versions are now part of the same condition.
This commit is contained in:
parent
4ff0916caa
commit
efbef95bf1
2 changed files with 8 additions and 10 deletions
|
|
@ -361,11 +361,11 @@
|
|||
- name: failed count + 1
|
||||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
when: ansible_facts['distribution'] != 'RedHat' and ansible_facts ['distribution_version'] is version('8.5', '!=')
|
||||
when: ansible_facts['distribution'] != 'RedHat' and ansible_facts['distribution_version'] is version('8.5', '!=')
|
||||
|
||||
# case: check installed greenboot packages
|
||||
# https://github.com/osbuild/osbuild-composer/blob/master/internal/distro/rhel8/distro.go#L634
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.6+ and CS9)
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.6+, CS8, and CS9)
|
||||
block:
|
||||
- name: greenboot and it's related packages should be installed
|
||||
shell: rpm -qa | grep greenboot
|
||||
|
|
@ -385,9 +385,9 @@
|
|||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
when: (ansible_facts['distribution'] == 'RedHat' and ansible_facts['distribution_version'] is version('8.6', '>=')) or
|
||||
(ansible_facts['distribution'] == 'CentOS' and ansible_facts['distribution_major_version'] is version('9', '=='))
|
||||
(ansible_facts['distribution'] == 'CentOS')
|
||||
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.5, CS8, and Fedora)
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.5 and Fedora)
|
||||
block:
|
||||
- name: greenboot and it's related packages should be installed
|
||||
shell: rpm -qa | grep greenboot
|
||||
|
|
@ -410,7 +410,6 @@
|
|||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
when: (ansible_facts['distribution'] == 'RedHat' and ansible_facts['distribution_version'] is version('8.6', '<')) or
|
||||
(ansible_facts['distribution'] == 'CentOS' and ansible_facts['distribution_major_version'] is version('8', '==')) or
|
||||
(ansible_facts['distribution'] == 'Fedora')
|
||||
|
||||
- name: greenboot should be installed
|
||||
|
|
|
|||
|
|
@ -320,11 +320,11 @@
|
|||
- name: failed count + 1
|
||||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
when: ansible_facts['distribution'] != 'RedHat' and ansible_facts ['distribution_version'] is version('8.5', '!=')
|
||||
when: ansible_facts['distribution'] != 'RedHat' and ansible_facts['distribution_version'] is version('8.5', '!=')
|
||||
|
||||
# case: check installed greenboot packages
|
||||
# https://github.com/osbuild/osbuild-composer/blob/master/internal/distro/rhel8/distro.go#L634
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.6+ and CS9)
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.6+, CS8, and CS9)
|
||||
block:
|
||||
- name: greenboot and it's related packages should be installed
|
||||
shell: rpm -qa | grep greenboot
|
||||
|
|
@ -344,9 +344,9 @@
|
|||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
when: (ansible_facts['distribution'] == 'RedHat' and ansible_facts['distribution_version'] is version('8.6', '>=')) or
|
||||
(ansible_facts['distribution'] == 'CentOS' and ansible_facts['distribution_major_version'] is version('9', '=='))
|
||||
(ansible_facts['distribution'] == 'CentOS')
|
||||
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.5, CS8, and Fedora)
|
||||
- name: greenboot and it's related packages should be installed (RHEL 8.5 and Fedora)
|
||||
block:
|
||||
- name: greenboot and it's related packages should be installed
|
||||
shell: rpm -qa | grep greenboot
|
||||
|
|
@ -369,7 +369,6 @@
|
|||
set_fact:
|
||||
failed_counter: "{{ failed_counter | int + 1 }}"
|
||||
when: (ansible_facts['distribution'] == 'RedHat' and ansible_facts['distribution_version'] is version('8.6', '<')) or
|
||||
(ansible_facts['distribution'] == 'CentOS' and ansible_facts['distribution_major_version'] is version('8', '==')) or
|
||||
(ansible_facts['distribution'] == 'Fedora')
|
||||
|
||||
# case: check greenboot* services
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue