Commit 890a9dc6 by John Jarvis

role parameters for ec2 launch role

parent 73f2664d
- name: Create sandbox instance
- name: Create ec2 instance
hosts: localhost
connection: local
gather_facts: False
vars:
keypair: continuous-integration
instance_type: m1.small
security_group: sandbox
image: ami-d0f89fb9
region: us-east-1
instance_tags: '{"disposable": "true"}'
size: 50
roles:
- launch_instance
- role: launch_instance
keypair: {{ keypair }}
instance_type: {{ instance_type }}
security_group: {{ security_group }}
ami_image: {{ ami }}
region: {{ region }}
instance_tags: {{ instance_tags }}
size: {{ size }}
- name: Configure instance(s)
hosts: launched
......
# Launches an ec2 instance and blocks until the instance is up
# adds it to the host group
- name: launch_instance | Launch instance
- name: launch_ec2 | Launch ec2 instance
local_action:
module: ec2
keypair: "{{keypair}}"
group: "{{security_group}}"
instance_type: "{{instance_type}}"
image: "{{image}}"
keypair: "{{ keypair }}"
group: "{{ security_group }}"
instance_type: "{{ instance_type }}"
image: "{{ ami }}"
wait: true
region: "{{region}}"
region: "{{ region }}"
instance_tags: "{{instance_tags}}"
register: ec2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment