1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Use inventory_source source_vars to control what address we use for ansible_ssh_host

This commit is contained in:
Matthew Jones 2015-04-23 11:07:31 -04:00
parent f45d75c06c
commit abdfb26b3d

View File

@ -938,7 +938,8 @@ class RunInventoryUpdate(BaseTask):
username=credential.username, username=credential.username,
password=decrypt_field(credential, "password"), password=decrypt_field(credential, "password"),
project_name=credential.project) project_name=credential.project)
openstack_data = {"clouds": {"devstack": {"private": "true", "auth": openstack_auth}}} private_state = str(inventory_update.source_vars_dict.get("private", "true"))
openstack_data = {"clouds": {"devstack": {"private": private_state, "auth": openstack_auth}}}
return yaml.safe_dump(openstack_data, default_flow_style=False, allow_unicode=True) return yaml.safe_dump(openstack_data, default_flow_style=False, allow_unicode=True)
cp = ConfigParser.ConfigParser() cp = ConfigParser.ConfigParser()