Fix rhel optional repo not found and not reported as error
error links: http://pastebin.test.redhat.com/872688 http://pastebin.test.redhat.com/872689 problem 1) currently even a made up repo enable command returns zero: [stack@undercloud-0 ~]$ sudo yum-config-manager --enable petepan-repo-rhel-7 [stack@undercloud-0 ~]$ echo $? 0 we can switch to using "shell" ansible module, and grep for the baseurl so that the if it fails we'll actually catch the error problem 2) no such thing as rhel-7-server-optional-rpms repo (exists only in som latest versions) what does exist is : rhelosp-rhel-7.8-server-opt and we can use : rhelosp-rhel-*-server-opt to be version agnostic Change-Id: Icd5c62d3d421e0f561032620ab3548d32b4ff387
This commit is contained in:
parent
bb6f4c4faf
commit
31ce2569c1
@ -2,8 +2,8 @@
|
||||
|
||||
- name: "enable yum repos"
|
||||
become: yes
|
||||
command:
|
||||
yum-config-manager --enable '{{ item }}'
|
||||
shell:
|
||||
yum-config-manager --enable '{{ item }}' |grep baseurl
|
||||
loop: '{{ enable_yum_repos }}'
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
enable_yum_repos:
|
||||
- rhel-7-server-optional-rpms
|
||||
- rhelosp-rhel-*-server-opt
|
||||
|
||||
python_packages:
|
||||
python3:
|
||||
|
Loading…
Reference in New Issue
Block a user