summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/provision.yml
blob: 2b5f317d8ca54555c5b1b924b81f41ed0c87f4a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
- include_tasks: vpc_and_subnet_id.yml

- name: include scale group creation for master
  include_tasks: build_node_group.yml
  with_items: "{{ openshift_aws_master_group }}"
  vars:
    l_node_group_config: "{{ openshift_aws_master_group_config }}"
  loop_control:
    loop_var: openshift_aws_node_group

- name: fetch newly created instances
  ec2_instance_facts:
    region: "{{ openshift_aws_region }}"
    filters:
      "tag:clusterid": "{{ openshift_aws_clusterid }}"
      "tag:host-type": "master"
      instance-state-name: running
  register: instancesout
  retries: 20
  delay: 3
  until: instancesout.instances|length > 0

- name: wait for ssh to become available
  wait_for:
    port: 22
    host: "{{ item.public_ip_address }}"
    timeout: 300
    search_regex: OpenSSH
  with_items: "{{ instancesout.instances }}"
  when: openshift_aws_wait_for_ssh | bool