summaryrefslogtreecommitdiffstats
path: root/playbooks/gce/openshift-node/terminate.yml
diff options
context:
space:
mode:
authorWesley Hearn <wesley.s.hearn@gmail.com>2015-04-24 14:06:02 -0400
committerWesley Hearn <wesley.s.hearn@gmail.com>2015-04-24 14:06:02 -0400
commit196d37e2ffa0d7f4221a857b143fd09f84a9d00b (patch)
tree4c5413c72a2dd2ec732730b6994a104cca6a9798 /playbooks/gce/openshift-node/terminate.yml
parent7f7b582a7bc239e69c147b98c8c2512050f12851 (diff)
parent8ce5e1de898d2fd2c4aa4620f31b57b62ed0c5d6 (diff)
downloadopenshift-196d37e2ffa0d7f4221a857b143fd09f84a9d00b.tar.gz
openshift-196d37e2ffa0d7f4221a857b143fd09f84a9d00b.tar.bz2
openshift-196d37e2ffa0d7f4221a857b143fd09f84a9d00b.tar.xz
openshift-196d37e2ffa0d7f4221a857b143fd09f84a9d00b.zip
Merge pull request #187 from openshift/master
Merge master into INT
Diffstat (limited to 'playbooks/gce/openshift-node/terminate.yml')
-rw-r--r--playbooks/gce/openshift-node/terminate.yml11
1 files changed, 5 insertions, 6 deletions
diff --git a/playbooks/gce/openshift-node/terminate.yml b/playbooks/gce/openshift-node/terminate.yml
index 7d71dfcab..357e0c295 100644
--- a/playbooks/gce/openshift-node/terminate.yml
+++ b/playbooks/gce/openshift-node/terminate.yml
@@ -3,10 +3,9 @@
hosts: localhost
gather_facts: no
tasks:
- - name: Evaluate oo_host_group_exp if it's set
- add_host: "name={{ item }} groups=oo_nodes_to_terminate"
- with_items: "{{ oo_host_group_exp | default('') }}"
- when: oo_host_group_exp is defined
+ - name: Evaluate oo_nodes_to_terminate
+ add_host: name={{ item }} groups=oo_nodes_to_terminate
+ with_items: oo_host_group_exp | default([])
- name: Terminate node instances
hosts: localhost
@@ -22,6 +21,7 @@
instance_names: "{{ groups['oo_nodes_to_terminate'] }}"
disks: "{{ groups['oo_nodes_to_terminate'] }}"
register: gce
+ when: "'oo_nodes_to_terminate' in groups"
- name: Remove disks of instances
gce_pd:
@@ -32,5 +32,4 @@
zone: "{{ gce.zone }}"
state: absent
with_items: gce.instance_names
-
-
+ when: "'oo_nodes_to_terminate' in groups"