summaryrefslogtreecommitdiffstats
path: root/playbooks/gce/openshift-cluster/terminate.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/gce/openshift-cluster/terminate.yml')
-rw-r--r--playbooks/gce/openshift-cluster/terminate.yml5
1 files changed, 3 insertions, 2 deletions
diff --git a/playbooks/gce/openshift-cluster/terminate.yml b/playbooks/gce/openshift-cluster/terminate.yml
index e20e0a8bc..faa46c0d6 100644
--- a/playbooks/gce/openshift-cluster/terminate.yml
+++ b/playbooks/gce/openshift-cluster/terminate.yml
@@ -2,17 +2,17 @@
- name: Terminate instance(s)
hosts: localhost
connection: local
+ become: no
gather_facts: no
vars_files:
- vars.yml
tasks:
- - set_fact: scratch_group=tag_env-{{ cluster_id }}
- add_host:
name: "{{ item }}"
groups: oo_hosts_to_terminate
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- with_items: groups[scratch_group] | default([], true) | difference(['localhost']) | difference(groups.status_terminated | default([], true))
+ with_items: (groups['tag_clusterid-' ~ cluster_id] | default([])) | difference(['localhost'])
- name: Unsubscribe VMs
hosts: oo_hosts_to_terminate
@@ -27,6 +27,7 @@
- name: Terminate instances(s)
hosts: localhost
+ become: no
connection: local
gather_facts: no
vars_files: