provision_masters.yml 884 B

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. - import_tasks: vpc_and_subnet_id.yml
  3. - import_tasks: provision_ec2_facts.yml
  4. - name: include master instance creation
  5. import_tasks: provision_ec2.yml
  6. - name: fetch newly created instances
  7. ec2_instance_facts:
  8. region: "{{ openshift_aws_region }}"
  9. filters:
  10. "tag:clusterid": "{{ openshift_aws_clusterid }}"
  11. "tag:host-type": "master"
  12. instance-state-name: running
  13. register: instancesout
  14. retries: 20
  15. delay: 3
  16. until: instancesout.instances|length > 0
  17. - name: include ec2 register
  18. include_tasks: elb_reg.yml
  19. loop: "{{ openshift_aws_elb_dict['master'] | dict2items }}"
  20. loop_control:
  21. loop_var: l_elb
  22. - name: wait for ssh to become available
  23. wait_for:
  24. port: 22
  25. host: "{{ item.public_ip_address }}"
  26. timeout: 300
  27. search_regex: OpenSSH
  28. with_items: "{{ instancesout.instances }}"
  29. when: openshift_aws_wait_for_ssh | bool