summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/remove_scale_group.yml
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-12-12 09:15:52 -0500
committerGitHub <noreply@github.com>2017-12-12 09:15:52 -0500
commit01ae634a0bf89fe840006f9139f8ffd20e09afc8 (patch)
treed53a7c03e4855885e124559018fff32adeaaf4ea /roles/openshift_aws/tasks/remove_scale_group.yml
parent0b6fa3dcd40c2dd1f42fcceb52f82c2a28ed96e2 (diff)
parent35c1abb6050f2cd1f31396edd42618a2998bd546 (diff)
downloadopenshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.tar.gz
openshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.tar.bz2
openshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.tar.xz
openshift-01ae634a0bf89fe840006f9139f8ffd20e09afc8.zip
Merge pull request #6335 from kwoodson/node_groups_refactor
Node group management update.
Diffstat (limited to 'roles/openshift_aws/tasks/remove_scale_group.yml')
-rw-r--r--roles/openshift_aws/tasks/remove_scale_group.yml9
1 files changed, 6 insertions, 3 deletions
diff --git a/roles/openshift_aws/tasks/remove_scale_group.yml b/roles/openshift_aws/tasks/remove_scale_group.yml
index 55d1af2b5..a01cde294 100644
--- a/roles/openshift_aws/tasks/remove_scale_group.yml
+++ b/roles/openshift_aws/tasks/remove_scale_group.yml
@@ -1,10 +1,13 @@
---
+# FIGURE OUT HOW TO REMOVE SCALE GROUPS
+# use openshift_aws_current_asgs??
- name: fetch the scale groups
ec2_asg_facts:
region: "{{ openshift_aws_region }}"
+ name: "^{{ item }}$"
tags:
- "{{ {'kubernetes.io/cluster/' ~ openshift_aws_clusterid: openshift_aws_clusterid,
- 'version': openshift_aws_current_version} }}"
+ "{{ {'kubernetes.io/cluster/' ~ openshift_aws_clusterid: openshift_aws_clusterid} }}"
+ with_items: "{{ openshift_aws_current_asgs if openshift_aws_current_asgs != [] else openshift_aws_asgs_to_remove }}"
register: qasg
- name: remove non-master scale groups
@@ -14,7 +17,7 @@
name: "{{ item.auto_scaling_group_name }}"
when: "'master' not in item.auto_scaling_group_name"
register: asg_results
- with_items: "{{ qasg.results }}"
+ with_items: "{{ qasg | json_query('results[*]') | sum(attribute='results', start=[]) }}"
async: 600
poll: 0