summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2016-08-26 17:17:28 -0400
committerGitHub <noreply@github.com>2016-08-26 17:17:28 -0400
commitf05d7c1f74c13dc7bcd46718a1eee0586055f326 (patch)
treef4d486d0f166b1cda04504ce0b30203ff8b2c3a4 /playbooks/adhoc
parent83f439d37958de3cf4348e20baac261ef954e25d (diff)
parent91e5f3ada096d5a6e5bb6fc5de267990f99fcc6a (diff)
downloadopenshift-f05d7c1f74c13dc7bcd46718a1eee0586055f326.tar.gz
openshift-f05d7c1f74c13dc7bcd46718a1eee0586055f326.tar.bz2
openshift-f05d7c1f74c13dc7bcd46718a1eee0586055f326.tar.xz
openshift-f05d7c1f74c13dc7bcd46718a1eee0586055f326.zip
Merge pull request #2366 from Mangirdaz/master
add run_once to repeatable actions
Diffstat (limited to 'playbooks/adhoc')
-rw-r--r--playbooks/adhoc/metrics_setup/playbooks/install.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/playbooks/adhoc/metrics_setup/playbooks/install.yml b/playbooks/adhoc/metrics_setup/playbooks/install.yml
index 235f775ef..a9ec3c1ef 100644
--- a/playbooks/adhoc/metrics_setup/playbooks/install.yml
+++ b/playbooks/adhoc/metrics_setup/playbooks/install.yml
@@ -16,21 +16,30 @@
- name: "Add metrics-deployer"
command: "{{item}}"
+ run_once: true
+ register: output
+ failed_when: ('already exists' not in output.stderr) and (output.rc != 0)
with_items:
- oc project openshift-infra
- oc create -f /tmp/metrics-deployer-setup.yaml
- name: "Give metrics-deployer SA permissions"
command: "oadm policy add-role-to-user edit system:serviceaccount:openshift-infra:metrics-deployer"
+ run_once: true
- name: "Give heapster SA permissions"
command: "oadm policy add-cluster-role-to-user cluster-reader system:serviceaccount:openshift-infra:heapster"
+ run_once: true
- name: "Create metrics-deployer secret"
command: "oc secrets new metrics-deployer nothing=/dev/null"
+ register: output
+ failed_when: ('already exists' not in output.stderr) and (output.rc != 0)
+ run_once: true
- name: "Copy metrics.yaml to remote"
copy: "src=../files/metrics.yaml dest=/tmp/metrics.yaml force=yes"
- name: "Process yml template"
shell: "oc process -f /tmp/metrics.yaml -v MASTER_URL={{ masterPublicURL }},REDEPLOY=true,HAWKULAR_METRICS_HOSTNAME={{ metrics_external_service }},IMAGE_PREFIX={{ metrics_image_prefix }},IMAGE_VERSION={{ metrics_image_version }},USE_PERSISTENT_STORAGE=false | oc create -f -"
+ run_once: true \ No newline at end of file