2012-10-30 22:12:48 +00:00
|
|
|
---
|
|
|
|
- name: spin it up
|
2014-01-17 04:43:49 +00:00
|
|
|
local_action: ec2 keypair={{ keypair }} image={{ image }} type={{ instance_type }} wait=true group={{ security_group }} ec2_access_key={{ transient_access_key }} ec2_secret_key={{ transient_secret_key }} ec2_url={{ os_ec2_url }}
|
2012-10-30 22:12:48 +00:00
|
|
|
register: inst_res
|
|
|
|
|
|
|
|
- name: add it to the special group
|
2014-01-01 19:15:11 +00:00
|
|
|
local_action: add_host hostname={{ inst_res.instances[0].public_ip }} groupname=tmp_just_created
|
2012-10-30 22:12:48 +00:00
|
|
|
|
2013-04-23 22:05:53 +00:00
|
|
|
|
2012-10-30 22:12:48 +00:00
|
|
|
- name: mail off about where it is
|
2014-01-01 19:15:11 +00:00
|
|
|
local_action: mail to=sysadmin-main-members@fedoraproject.org from=ansible-create@fedoraproject.org subject={{ inst_res.instances[0].public_ip }} msg="cloud instance created on {{ inst_res.instances[0].public_ip }}\n instance id - {{ inst_res.instances[0].id }} - {{ hostbase }} {{ root_auth_users }} "
|
2012-10-30 22:12:48 +00:00
|
|
|
|
|
|
|
- name: wait for the host to be hot
|
2014-01-01 19:15:11 +00:00
|
|
|
local_action: wait_for host={{ inst_res.instances[0].public_ip }} port=22 delay=2 timeout=300
|
2012-10-30 22:12:48 +00:00
|
|
|
|
|
|
|
|