Hopefully this will do it.

This commit is contained in:
Kevin Fenzi 2015-05-13 22:16:29 +00:00
parent 7396c06565
commit dbb5c1d3d7

View file

@ -20,17 +20,15 @@
user_data: "#cloud-config\ndisable_root: 0"
register: nova_result
- debug: var=nova_result
- name: add it to the special group
local_action: add_host hostname="{{ public_ip }}" groupname=tmp_just_created
local_action: add_host hostname="{{ nova_result.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={{ public_ip }} msg="cloud instance created on {{ public_ip }}\n {{ hostbase }} {{ root_auth_users }} "
#
- name: wait for he host to be hot
local_action: wait_for host={{ public_ip }} port=22 delay=1 timeout=600
local_action: wait_for host={{ nova_result.public_ip }} port=22 delay=1 timeout=600
# SSH is up and running, however cloud-init still did not deployed ssh keypair
# we have to wait some time. 10 sec is usually enough, but not always.