Fix up transient cloud playbook to use the right thing for ip
This commit is contained in:
parent
8921a80925
commit
afcafd62e6
1 changed files with 5 additions and 5 deletions
|
@ -28,22 +28,22 @@
|
||||||
local_action: mail
|
local_action: mail
|
||||||
to=sysadmin-main-members@fedoraproject.org
|
to=sysadmin-main-members@fedoraproject.org
|
||||||
from=ansible-create@fedoraproject.org
|
from=ansible-create@fedoraproject.org
|
||||||
subject="{{ nova_result.public_ip }}"
|
subject="{{ nova_result.public_ip[0] }}"
|
||||||
body="transient cloud instance created on {{ nova_result.public_ip }}
|
body="transient cloud instance created on {{ nova_result.public_ip[0] }}
|
||||||
name = {{ name }}
|
name = {{ name }}
|
||||||
root_auth_users = {{ root_auth_users }}
|
root_auth_users = {{ root_auth_users }}
|
||||||
image = {{ image }}"
|
image = {{ image }}"
|
||||||
|
|
||||||
- name: wait for he host to be hot
|
- name: wait for he host to be hot
|
||||||
local_action: wait_for host={{ nova_result.public_ip }} port=22 delay=1 timeout=600
|
local_action: wait_for host={{ nova_result.public_ip[0] }} port=22 delay=1 timeout=600
|
||||||
|
|
||||||
- name: gather ssh host key from new instance
|
- name: gather ssh host key from new instance
|
||||||
local_action: command ssh-keyscan -t rsa {{ nova_result.public_ip }}
|
local_action: command ssh-keyscan -t rsa {{ nova_result.public_ip[0] }}
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
register: hostkey
|
register: hostkey
|
||||||
|
|
||||||
- name: add new ssh host key (you still need to add it to official ssh_host_keys later)
|
- name: add new ssh host key (you still need to add it to official ssh_host_keys later)
|
||||||
local_action: known_hosts path={{item}} key="{{ hostkey.stdout }}" host={{ nova_result.public_ip }} state=present
|
local_action: known_hosts path={{item}} key="{{ hostkey.stdout }}" host={{ nova_result.public_ip[0] }} state=present
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
with_items:
|
with_items:
|
||||||
- /root/.ssh/known_hosts
|
- /root/.ssh/known_hosts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue