Set both the hostname and ip address for servers created
As the set_hostnames playbook relies on inventory having hostnames, we put both, so we can ssh to servers via ansible_ssh_host and we can also infer info from inventory_hostname to set the hostnames. Change-Id: I10e153f11f85828c98cf728609a6ca18ae1a8d2a
This commit is contained in:
parent
047e9ab687
commit
bd2003ce3a
@ -393,7 +393,7 @@
|
||||
- servers
|
||||
register: os_server_result
|
||||
|
||||
- add_host: name={{ item.server.public_v4 }} groups=cl_servers_just_created
|
||||
- add_host: name={{ item.server.name }} groups=cl_servers_just_created ansible_ssh_host={{ item.server.public_v4 }}
|
||||
with_items: "{{ os_server_result.results }}"
|
||||
|
||||
- name: Create profiles servers for {{ item_cloud.name }}
|
||||
@ -432,5 +432,5 @@
|
||||
- servers
|
||||
register: os_server_result
|
||||
|
||||
- add_host: name={{ item.server.public_v4 }} groups=cl_servers_just_created
|
||||
- add_host: name={{ item.server.name }} groups=cl_servers_just_created ansible_ssh_host={{ item.server.public_v4 }}
|
||||
with_items: "{{ os_server_result.results }}"
|
||||
|
Loading…
Reference in New Issue
Block a user