Only use RHEL8 deps repo on Red Hat systems newer than 7

cecf9e902c
broke Openstack jobs running on Red Hat 7.

This review includes the ansible_distribution_major_version
when deciding which repos to include for openvswitch.

Change-Id: I6ec32e2913843adb0778a63133296bb26a0b5e6e
This commit is contained in:
Ronelle Landy 2019-08-28 15:14:24 -04:00
parent fa2cbeaae2
commit e1ebeefecb
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# Vendored from rdo-release: https://github.com/rdo-infra/rdo-release
{% if ansible_distribution == 'CentOS' %}
{% if ansible_distribution in ['CentOS', 'RedHat'] and ansible_distribution_major_version|int <= 7 %}
[centos-openstack-queens]
name=CentOS OpenStack Queens Repository
{% if zuul_site_mirror_fqdn is defined %}
@ -10,10 +10,10 @@ baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-queens/
gpgcheck=1
enabled=1
gpgkey=file:///tmp/RPM-GPG-KEY-CentOS-SIG-Cloud
{% elif ansible_distribution == 'RedHat' %}
{% elif ansible_distribution == 'RedHat' and ansible_distribution_major_version|int >= 8 %}
[RDO-RHEL8-deps]
name=RedHat Openstack deps repo
baseurl=https://trunk.rdoproject.org/rhel8-master/deps/latest/
gpgcheck=0
enabled=1
{% endif %}
{% endif %}

View File

@ -1,3 +1,8 @@
---
ovs_package: "rhosp-openvswitch"
ovs_package: >-
{% if ansible_distribution_major_version|int >= 8 -%}
rhosp-openvswitch
{%- else -%}
openvswitch
{%- endif %}
ovs_service: "openvswitch"