summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2017-07-18 14:31:26 -0400
committerAndrew Butcher <abutcher@redhat.com>2017-07-18 15:42:01 -0400
commiteec2f317cb4ea707f4e528bd7bb6f4e643fb865d (patch)
treeb243b1a05481f78d72f3e6bcc1a5ff0b80512e2e /playbooks
parent742203529902ba278c213e326f81f667304b9625 (diff)
downloadopenshift-eec2f317cb4ea707f4e528bd7bb6f4e643fb865d.tar.gz
openshift-eec2f317cb4ea707f4e528bd7bb6f4e643fb865d.tar.bz2
openshift-eec2f317cb4ea707f4e528bd7bb6f4e643fb865d.tar.xz
openshift-eec2f317cb4ea707f4e528bd7bb6f4e643fb865d.zip
Fail within scaleup playbooks when new_{nodes,masters} host groups are empty.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/byo/openshift-master/scaleup.yml14
-rw-r--r--playbooks/byo/openshift-node/scaleup.yml13
2 files changed, 27 insertions, 0 deletions
diff --git a/playbooks/byo/openshift-master/scaleup.yml b/playbooks/byo/openshift-master/scaleup.yml
index 8aa07a664..64811e80d 100644
--- a/playbooks/byo/openshift-master/scaleup.yml
+++ b/playbooks/byo/openshift-master/scaleup.yml
@@ -1,6 +1,20 @@
---
- include: ../openshift-cluster/initialize_groups.yml
+- name: Ensure there are new_masters
+ hosts: localhost
+ connection: local
+ become: no
+ gather_facts: no
+ tasks:
+ - fail:
+ msg: >
+ Detected no new_masters or no new_nodes in inventory. Please
+ add hosts to the new_masters and new_nodes host groups to add
+ masters.
+ when:
+ - (g_new_master_hosts | default([]) | length == 0) or (g_new_node_hosts | default([]) | length == 0)
+
- include: ../../common/openshift-master/scaleup.yml
vars:
openshift_cluster_id: "{{ cluster_id | default('default') }}"
diff --git a/playbooks/byo/openshift-node/scaleup.yml b/playbooks/byo/openshift-node/scaleup.yml
index c6965fd6f..fda89b1ea 100644
--- a/playbooks/byo/openshift-node/scaleup.yml
+++ b/playbooks/byo/openshift-node/scaleup.yml
@@ -1,6 +1,19 @@
---
- include: ../openshift-cluster/initialize_groups.yml
+- name: Ensure there are new_nodes
+ hosts: localhost
+ connection: local
+ become: no
+ gather_facts: no
+ tasks:
+ - fail:
+ msg: >
+ Detected no new_nodes in inventory. Please add hosts to the
+ new_nodes host group to add nodes.
+ when:
+ - g_new_node_hosts | default([]) | length == 0
+
- include: ../../common/openshift-node/scaleup.yml
vars:
openshift_cluster_id: "{{ cluster_id | default('default') }}"