summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorDavid Moreau-Simard <dms@redhat.com>2017-05-15 14:18:23 -0400
committerDavid Moreau-Simard <dms@redhat.com>2017-05-15 14:18:23 -0400
commit0414e424c90000a9aa393a1d47404b726a2443d3 (patch)
treec4a2701c72b0c94e670de301d2b086c4f8873c90 /roles
parentd1d60e24b54ca6ba0dc98e8b0b2ea4cfa8b92830 (diff)
downloadopenshift-0414e424c90000a9aa393a1d47404b726a2443d3.tar.gz
openshift-0414e424c90000a9aa393a1d47404b726a2443d3.tar.bz2
openshift-0414e424c90000a9aa393a1d47404b726a2443d3.tar.xz
openshift-0414e424c90000a9aa393a1d47404b726a2443d3.zip
Don't set-up origin repositories if they've already been configured
CentOS ships the 'centos-release-openshift-origin' package which is used to set up the repository and the key. If this package has been installed prior to running openshift-ansible (i.e, to install ansible or openshift-ansible from RPM), it leads to the repository being set up twice in different files. We're now matching the name of the files and since they are identical, it will stay idempotent while not configuring the repositories twice.
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_repos/tasks/main.yaml8
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml
index 9a9436fcb..023b1a9b7 100644
--- a/roles/openshift_repos/tasks/main.yaml
+++ b/roles/openshift_repos/tasks/main.yaml
@@ -24,15 +24,19 @@
- openshift_additional_repos | length == 0
notify: refresh cache
+ # Note: OpenShift repositories under CentOS may be shipped through the
+ # "centos-release-openshift-origin" package which configures the repository.
+ # This task matches the file names provided by the package so that they are
+ # not installed twice in different files and remains idempotent.
- name: Configure origin gpg keys if needed
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
with_items:
- src: origin/gpg_keys/openshift-ansible-CentOS-SIG-PaaS
- dest: /etc/pki/rpm-gpg/
+ dest: /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS
- src: origin/repos/openshift-ansible-centos-paas-sig.repo
- dest: /etc/yum.repos.d/
+ dest: /etc/yum.repos.d/CentOS-OpenShift-Origin.repo
notify: refresh cache
when:
- ansible_os_family == "RedHat"