summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorOpenShift Bot <eparis+openshiftbot@redhat.com>2017-05-04 15:05:53 -0500
committerGitHub <noreply@github.com>2017-05-04 15:05:53 -0500
commit0f85adf01fdb6432b9155e31dbfb17ffb731f161 (patch)
tree77c9096197280e3e84f2cb3fe70e14eda39a4185 /roles
parenta893d4fab69a45be6782ce2d0161162acca04226 (diff)
parent5c8450e53fcb216cd22f74150d53a73e17bef5a0 (diff)
downloadopenshift-0f85adf01fdb6432b9155e31dbfb17ffb731f161.tar.gz
openshift-0f85adf01fdb6432b9155e31dbfb17ffb731f161.tar.bz2
openshift-0f85adf01fdb6432b9155e31dbfb17ffb731f161.tar.xz
openshift-0f85adf01fdb6432b9155e31dbfb17ffb731f161.zip
Merge pull request #4044 from mtnbikenc/clean-cache
Merged by openshift-bot
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_repos/tasks/main.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml
index 84a0905cc..9a9436fcb 100644
--- a/roles/openshift_repos/tasks/main.yaml
+++ b/roles/openshift_repos/tasks/main.yaml
@@ -40,4 +40,21 @@
- openshift_deployment_type == 'origin'
- openshift_enable_origin_repo | default(true) | bool
+ # Singleton block
+ - when: r_osr_first_run | default(true)
+ block:
+ - name: Ensure clean repo cache in the event repos have been changed manually
+ debug:
+ msg: "First run of openshift_repos"
+ changed_when: true
+ notify: refresh cache
+
+ - name: Set fact r_osr_first_run false
+ set_fact:
+ r_osr_first_run: false
+
+ # Force running ALL handlers now, because we expect repo cache to be cleared
+ # if changes have been made.
+ - meta: flush_handlers
+
when: not ostree_booted.stat.exists