Set higher priority for COPR repo
This patch sets the priority for the COPR repository on CentOS 7 (which we use to install LXC) to a higher priority than the default. This ensures we always get our LXC packages from the COPR repo. Change-Id: I07d127cb5fba8f4e30633da88eaecf9228eb350a
This commit is contained in:
parent
7a92a1ee69
commit
d902d53b36
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The COPR repository for installing LXC on CentOS 7 is now set to a higher
|
||||
priority than the default to ensure that LXC packages always come from the
|
||||
COPR repository.
|
@ -22,7 +22,24 @@
|
||||
gpgcheck: yes
|
||||
gpgkey: "{{ lxc_centos_package_key }}"
|
||||
repo_gpgcheck: no
|
||||
priority: 50
|
||||
state: present
|
||||
register: copr_repository_deploy
|
||||
|
||||
# NOTE: Existing CentOS environments may not have the COPR repo priority set
|
||||
# higher than the default. The following task ensures that existing
|
||||
# deployments have their priority adjusted for the COPR repository.
|
||||
# TODO(mhayden): The ini_file module is required here since the yum_repository
|
||||
# module can only do add/remove operations, not edits.
|
||||
# Ansible bug: https://github.com/ansible/ansible/issues/22362
|
||||
- name: Ensure COPR repository priority is set
|
||||
ini_file:
|
||||
dest: /etc/yum.repos.d/thm-lxc2.0.repo
|
||||
section: thm-lxc2.0
|
||||
option: priority
|
||||
value: 50
|
||||
when:
|
||||
- not copr_repository_deploy | changed
|
||||
|
||||
- name: Add GPG key for COPR LXC repo
|
||||
rpm_key:
|
||||
|
Loading…
Reference in New Issue
Block a user