summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/aws/openshift-cluster/tasks/launch_instances.yml')
-rw-r--r--playbooks/aws/openshift-cluster/tasks/launch_instances.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
index 22c617fea..15e775770 100644
--- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
@@ -190,6 +190,22 @@
- instances
- ec2.instances
+- name: Add new instances to nodes_to_add group if needed
+ add_host:
+ hostname: "{{ item.0 }}"
+ ansible_ssh_host: "{{ item.1.dns_name }}"
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
+ ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
+ groups: nodes_to_add
+ ec2_private_ip_address: "{{ item.1.private_ip }}"
+ ec2_ip_address: "{{ item.1.public_ip }}"
+ openshift_node_labels: "{{ node_label }}"
+ logrotate_scripts: "{{ logrotate }}"
+ with_together:
+ - instances
+ - ec2.instances
+ when: oo_extend_env is defined and oo_extend_env | bool
+
- name: Wait for ssh
wait_for: "port=22 host={{ item.dns_name }}"
with_items: ec2.instances