---
- name: spin it up
  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
  register: inst_res

- name: add it to the special group
  local_action: add_host hostname=${inst_res.instances[0].public_ip} groupname=tmp_just_created


- name: mail off about where it is
  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} "

- name: wait for the host to be hot
  local_action: wait_for host=${inst_res.instances[0].public_ip} port=22 delay=2 timeout=300


