diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-11-08 18:20:46 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-11-29 21:22:39 -0500 |
commit | 6154f7d49847813dfdea9ad73aaaed86f18aa9de (patch) | |
tree | 50d571bb23627660e3f31854f513d9a044cc2178 /roles/openshift_aws/tasks/setup_scale_group_facts.yml | |
parent | 6b6b422245be79dd3eec0c93a58875c646bbfba7 (diff) | |
download | openshift-6154f7d49847813dfdea9ad73aaaed86f18aa9de.tar.gz openshift-6154f7d49847813dfdea9ad73aaaed86f18aa9de.tar.bz2 openshift-6154f7d49847813dfdea9ad73aaaed86f18aa9de.tar.xz openshift-6154f7d49847813dfdea9ad73aaaed86f18aa9de.zip |
Initial upgrade for scale groups.
Diffstat (limited to 'roles/openshift_aws/tasks/setup_scale_group_facts.yml')
-rw-r--r-- | roles/openshift_aws/tasks/setup_scale_group_facts.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/roles/openshift_aws/tasks/setup_scale_group_facts.yml b/roles/openshift_aws/tasks/setup_scale_group_facts.yml new file mode 100644 index 000000000..d65fdc2de --- /dev/null +++ b/roles/openshift_aws/tasks/setup_scale_group_facts.yml @@ -0,0 +1,37 @@ +--- +- name: group scale group nodes + ec2_remote_facts: + region: "{{ openshift_aws_region }}" + filters: + "{{ {'tag:kubernetes.io/cluster/' ~ openshift_aws_clusterid: openshift_aws_clusterid }}}" + register: qinstances + +- name: Build new node group + add_host: + groups: oo_sg_new_nodes + ansible_ssh_host: "{{ item.public_dns_name }}" + name: "{{ item.public_dns_name }}" + hostname: "{{ item.public_dns_name }}" + when: + - (item.tags.version | default(False)) == openshift_aws_new_version + - "'node' in item.tags['host-type']" + with_items: "{{ qinstances.instances }}" + +- name: Build current node group + add_host: + groups: oo_sg_current_nodes + ansible_ssh_host: "{{ item.public_dns_name }}" + name: "{{ item.public_dns_name }}" + hostname: "{{ item.public_dns_name }}" + when: + - (item.tags.version | default('')) == openshift_aws_current_version + - "'node' in item.tags['host-type']" + with_items: "{{ qinstances.instances }}" + +- name: place all nodes into nodes group + add_host: + groups: nodes + ansible_ssh_host: "{{ item.public_dns_name }}" + name: "{{ item.public_dns_name }}" + hostname: "{{ item.public_dns_name }}" + with_items: "{{ qinstances.instances }}" |