blob: 3b4c86df99d0019cee88f7ce8c081a6bcf843474 [file] [log] [blame]
---
# tasks file for aws-create
- name: Provision AMI instances
ec2:
assign_public_ip: '{{ assign_public_ip }}'
image: "{{ image_id }}"
instance_type: '{{ instance_type }}'
aws_access_key: "{{ aws_access_key|default(lookup('env', 'AWS_ACCESS_KEY_ID')) }}"
aws_secret_key: "{{ aws_secret_key|default(lookup('env', 'AWS_SECRET_ACCESS_KEY')) }}"
aws_region: "{{ aws_region|default(lookup('env', 'AWS_REGION')) }}"
key_name: '{{ key_name }}'
wait: '{{ wait }}'
state: present
group: '{{ security_group }}'
vpc_subnet_id: '{{ vpc_subnet_id }}'
volumes:
- device_name: '{{ device_name }}'
volume_type: '{{ volume_type }}'
volume_size: '{{ volume_size }}'
delete_on_termination: '{{ delete_on_termination }}'
instance_tags:
Name: 'dc{{ dc }}-n{{ item }}'
application: '{{ application }}'
bag: '{{ bag }}'
department: '{{ department }}'
company_env: '{{ company_env }}'
owner_contact_info: '{{ owner_contact_info }}'
pod: '{{ pod }}'
team_contact_info: '{{ team_contact_info }}'
env: '{{ session_name }}-{{ env }}-{{ os_selection }}'
register: status
with_sequence: start={{ start }} end={{ end }}
- name: Provision AMI instances Report
debug:
var: status