Skip to content

Commit 26ccf80

Browse files
committed
Print /etc/redhat-release after setting subscription or enabling repos
Sometimes the CI jobs can not find packages that normally are available in the repository for the RHEL release that the image is started in the CI, but the packages are not available in newer version. Print the version to make sure that we are using proper version. Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
1 parent a018e6b commit 26ccf80

4 files changed

Lines changed: 47 additions & 11 deletions

File tree

roles/adoption_osp_deploy/tasks/login_registries.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,27 @@
1818
when:
1919
- cifmw_adoption_osp_deploy_rhsm_org is defined
2020
- cifmw_adoption_osp_deploy_rhsm_key is defined
21-
become: true
22-
no_log: true
23-
community.general.redhat_subscription:
24-
activationkey: "{{ cifmw_adoption_osp_deploy_rhsm_key }}"
25-
org_id: "{{ cifmw_adoption_osp_deploy_rhsm_org }}"
26-
force_register: true
27-
state: present
28-
retries: 5
29-
delay: 30
30-
register: _rh_result
31-
until: not _rh_result.failed
21+
block:
22+
- name: Make redhat subscription
23+
become: true
24+
no_log: true
25+
community.general.redhat_subscription:
26+
activationkey: "{{ cifmw_adoption_osp_deploy_rhsm_key }}"
27+
org_id: "{{ cifmw_adoption_osp_deploy_rhsm_org }}"
28+
force_register: true
29+
state: present
30+
retries: 5
31+
delay: 30
32+
register: _rh_result
33+
until: not _rh_result.failed
34+
35+
- name: Get current /etc/redhat-release
36+
ansible.builtin.command: cat /etc/redhat-release
37+
register: _current_rh_release
38+
39+
- name: Print current /etc/redhat-release
40+
ansible.builtin.debug:
41+
msg: "{{ _current_rh_release.stdout }}"
3242

3343
- name: Login in container registry
3444
when:

roles/adoption_osp_deploy/tasks/prepare_overcloud.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@
121121
loop_var: _vm
122122
pause: 1
123123

124+
- name: Get current /etc/redhat-release
125+
delegate_to: "{{ _vm }}"
126+
ansible.builtin.command: cat /etc/redhat-release
127+
register: _current_rh_release
128+
129+
- name: Print current /etc/redhat-release
130+
ansible.builtin.debug:
131+
msg: "{{ _current_rh_release.stdout }}"
132+
124133
- name: Copy network data file if it's not a template
125134
when: _network_data_extension != '.j2'
126135
delegate_to: "osp-undercloud-0"

roles/adoption_osp_deploy/tasks/prepare_undercloud.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
name: "{{ cifmw_adoption_osp_deploy_repos }}"
3030
state: enabled
3131

32+
- name: Get current /etc/redhat-release
33+
ansible.builtin.command: cat /etc/redhat-release
34+
register: _current_rh_release
35+
36+
- name: Print current /etc/redhat-release
37+
ansible.builtin.debug:
38+
msg: "{{ _current_rh_release.stdout }}"
39+
3240
- name: Install director packages
3341
become: true
3442
ansible.builtin.dnf:

roles/ci_setup/tasks/repos.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@
3939
name: "{{ item }}"
4040
state: "{{ rhsm_repo_state | default('enabled') }}"
4141
loop: "{{ _repos }}"
42+
43+
- name: Get current /etc/redhat-release
44+
ansible.builtin.command: cat /etc/redhat-release
45+
register: _current_rh_release
46+
47+
- name: Print current /etc/redhat-release
48+
ansible.builtin.debug:
49+
msg: "{{ _current_rh_release.stdout }}"
50+
4251
rescue:
4352
- name: RHSM unavailable
4453
ansible.builtin.debug:

0 commit comments

Comments
 (0)