summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master_cluster/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_master_cluster/tasks/main.yml')
-rw-r--r--roles/openshift_master_cluster/tasks/main.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/openshift_master_cluster/tasks/main.yml b/roles/openshift_master_cluster/tasks/main.yml
new file mode 100644
index 000000000..315947183
--- /dev/null
+++ b/roles/openshift_master_cluster/tasks/main.yml
@@ -0,0 +1,13 @@
+---
+- name: Test if cluster is already configured
+ command: pcs status
+ register: pcs_status
+ changed_when: false
+ failed_when: false
+ when: not openshift.master.cluster_defer_ha | bool
+
+- include: configure.yml
+ when: "pcs_status | failed and 'Error: cluster is not currently running on this node' in pcs_status.stderr"
+
+- include: configure_deferred.yml
+ when: openshift.master.cluster_defer_ha | bool