summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-30 16:48:55 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-30 16:48:55 -0500
commitdecc31b2f15b260f50163655c6155d676349eef5 (patch)
tree38e587bf49061ec9a15f6700acec1a097b4b7cfe /roles
parent2dacc6226aeb79f0cf75725f5164fffe05208e58 (diff)
parent456a615fcbe3be207f9edbd4e0f6a38560bc6c1b (diff)
downloadopenshift-decc31b2f15b260f50163655c6155d676349eef5.tar.gz
openshift-decc31b2f15b260f50163655c6155d676349eef5.tar.bz2
openshift-decc31b2f15b260f50163655c6155d676349eef5.tar.xz
openshift-decc31b2f15b260f50163655c6155d676349eef5.zip
Merge pull request #971 from detiber/refreshCache
Update openshift_repos to refresh package cache on changes
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_repos/handlers/main.yml3
-rw-r--r--roles/openshift_repos/tasks/main.yaml5
2 files changed, 8 insertions, 0 deletions
diff --git a/roles/openshift_repos/handlers/main.yml b/roles/openshift_repos/handlers/main.yml
new file mode 100644
index 000000000..26558a455
--- /dev/null
+++ b/roles/openshift_repos/handlers/main.yml
@@ -0,0 +1,3 @@
+---
+- name: refresh package cache
+ command: yum clean all
diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml
index aa696ae12..66be0cb7b 100644
--- a/roles/openshift_repos/tasks/main.yaml
+++ b/roles/openshift_repos/tasks/main.yaml
@@ -20,12 +20,14 @@
src: yum_repo.j2
dest: /etc/yum.repos.d/openshift_additional.repo
when: openshift_additional_repos | length > 0
+ notify: refresh package cache
- name: Remove the additional repos if no longer defined
file:
dest: /etc/yum.repos.d/openshift_additional.repo
state: absent
when: openshift_additional_repos | length == 0
+ notify: refresh package cache
- name: Remove any yum repo files for other deployment types
file:
@@ -34,13 +36,16 @@
with_fileglob:
- '*/repos/*'
when: not (item | search("/files/" ~ openshift_deployment_type ~ "/repos"))
+ notify: refresh package cache
- name: Configure gpg keys if needed
copy: src={{ item }} dest=/etc/pki/rpm-gpg/
with_fileglob:
- "{{ openshift_deployment_type }}/gpg_keys/*"
+ notify: refresh package cache
- name: Configure yum repositories
copy: src={{ item }} dest=/etc/yum.repos.d/
with_fileglob:
- "{{ openshift_deployment_type }}/repos/*"
+ notify: refresh package cache