diff options
author | Jean-Philippe Evrard <evrardjp@users.noreply.github.com> | 2018-05-22 14:40:44 -0700 |
---|---|---|
committer | Adam Miller <admiller@redhat.com> | 2018-05-22 16:40:44 -0500 |
commit | b20520f500ad6878750bd2e2e8be46f756e4eaa5 (patch) | |
tree | 4e23175238278cbda2984f4e8e7ed4201ef6394a | |
parent | fde8c9b4ef1aad79c26ae08dcedbf249dabf155f (diff) | |
download | ansible-b20520f500ad6878750bd2e2e8be46f756e4eaa5.tar.gz |
Adds the non-deprecated ansible_host var (#34452)
OpenStack dynamic inventory is still using the deprecated
ansible_ssh_host. This patch adds ansible_host until such
time as ansible_ssh_host is removed
This is a backport from [1].
[1]: https://github.com/ansible/ansible/pull/23153
-rwxr-xr-x | contrib/inventory/openstack.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/inventory/openstack.py b/contrib/inventory/openstack.py index 6679a2cc3b..b7beb95a7d 100755 --- a/contrib/inventory/openstack.py +++ b/contrib/inventory/openstack.py @@ -121,6 +121,7 @@ def get_host_groups(inventory, refresh=False): def append_hostvars(hostvars, groups, key, server, namegroup=False): hostvars[key] = dict( ansible_ssh_host=server['interface_ip'], + ansible_host=server['interface_ip'], openstack=server) for group in get_groups_from_server(server, namegroup=namegroup): groups[group].append(key) |