summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorMangirdas <mangirdas@judeikis.lt>2016-08-26 16:34:08 +0100
committerMangirdas <mangirdas@judeikis.lt>2016-08-26 16:34:08 +0100
commit91e5f3ada096d5a6e5bb6fc5de267990f99fcc6a (patch)
tree2a270933a0aa0bd593ad59817072916c210550eb /playbooks
parent0cae017161b71e7c9e7c09cfc794672ecc6f897d (diff)
downloadopenshift-91e5f3ada096d5a6e5bb6fc5de267990f99fcc6a.tar.gz
openshift-91e5f3ada096d5a6e5bb6fc5de267990f99fcc6a.tar.bz2
openshift-91e5f3ada096d5a6e5bb6fc5de267990f99fcc6a.tar.xz
openshift-91e5f3ada096d5a6e5bb6fc5de267990f99fcc6a.zip
add check for server and account already exist
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/adhoc/metrics_setup/playbooks/install.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/playbooks/adhoc/metrics_setup/playbooks/install.yml b/playbooks/adhoc/metrics_setup/playbooks/install.yml
index 1aac8acb1..a9ec3c1ef 100644
--- a/playbooks/adhoc/metrics_setup/playbooks/install.yml
+++ b/playbooks/adhoc/metrics_setup/playbooks/install.yml
@@ -17,6 +17,8 @@
- 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
@@ -31,6 +33,8 @@
- 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"