Stop setting package priorities

By setting priorities to repositories, we're messing up the ordering
of things and possibly making upgrades even more complicated.  Also,
the yum_repository module of Ansible allows managing it there, so
there is no need for an extra non-idempotent task to be added on top.

We're going to set all of them to the default 99.  If we need to make
any changes, we have the option to do that as well.

Depends-On: I9443f10e8c803599cbebfc2a53cb9c432bfa60d1
Change-Id: I2e42ef4022aaaa2e1cb9f461e63ce2e9e1f49511
This commit is contained in:
Mohammed Naser 2018-06-20 15:49:38 -04:00
parent 2a3ffbeb6c
commit 28cc7583f6
3 changed files with 2 additions and 24 deletions

View File

@ -62,7 +62,6 @@ openstack_hosts_package_repos: "{{ _package_repos + (user_external_repos_list |
# Overridable package repo gpg is composed of the old override
# named user_external_repo_keys_list and the standard defaults _package_repos_keys
openstack_hosts_package_repos_keys: "{{ _package_repos_keys + (user_external_repo_keys_list | default([])) }}"
openstack_hosts_package_repos_priorities: "{{ _package_repos_priorities }}"
# The following garbage collection values are set to better support lots of neutron networks/routers.
# Used for setting the net.ipv4/6.neigh.default.gc_thresh* values. This assumes that facts were

View File

@ -91,6 +91,7 @@
gpgcheck: "{{ repo.gpgcheck | default(omit) }}"
enabled: "{{ repo.enabled | default('yes') }}"
exclude: "{{ repo.exclude | default(omit) }}"
priority: "{{ repo.priority | default(99) }}"
with_items: "{{ openstack_hosts_package_repos }}"
loop_control:
loop_var: repo
@ -113,13 +114,3 @@
with_items: "{{ openstack_hosts_package_repos }}"
when:
- item.name in existing_yum_repos.stdout
- name: Update repo priorities
command: >
yum-config-manager
{% for repo_priority in openstack_hosts_package_repos_priorities %}
--enable {{ repo_priority['name'] }} \
--setopt="{{ repo_priority['name'] }}.priority={{ repo_priority['priority'] }}"
{% endfor %}
# TODO(evrardjp): Be more idempotent
changed_when: false

View File

@ -115,16 +115,4 @@ _package_repos:
- name: rdo-deps
description: rdo-deps
baseurl: "{{ openstack_hosts_rdo_mirror_url }}/centos7-master/deps/latest/"
gpgcheck: no
_package_repos_priorities:
- name: base
priority: 50
- name: extras
priority: 50
- name: rdo-current-passed-ci
priority: 50
- name: rdo-qemu-ev
priority: 50
- name: updates
priority: 50
gpgcheck: no