provision_ec2.yml 849 B

1234567891011121314151617181920212223242526
  1. ---
  2. - name: create instance(s)
  3. ec2:
  4. assign_public_ip: yes
  5. count_tag:
  6. host-type: "master"
  7. ebs_optimized: True
  8. exact_count: "{{ l_subnetout_results[l_loop] }}"
  9. group_id: "{{ ec2sgs.security_groups | map(attribute='group_id') | list }}"
  10. instance_tags: "{{ l_instance_tags }}"
  11. instance_type: "{{ openshift_aws_master_instance_config.instance_type }}"
  12. image: "{{ l_image }}"
  13. key_name: "{{ openshift_aws_ssh_key_name }}"
  14. monitoring: False
  15. region: "{{ openshift_aws_region }}"
  16. termination_protection: False
  17. user_data: "{{ lookup('template', 'user_data.j2') }}"
  18. volumes: "{{ openshift_aws_master_instance_config.volumes }}"
  19. vpc_subnet_id: "{{ l_loop }}"
  20. wait: yes
  21. loop: "{{ l_subnetout_results | list }}"
  22. loop_control:
  23. loop_var: l_loop
  24. retries: 3
  25. delay: 3
  26. register: ec2s