diff --git a/tripleo_common/inventory.py b/tripleo_common/inventory.py index db1ec8fcd..2341384bd 100644 --- a/tripleo_common/inventory.py +++ b/tripleo_common/inventory.py @@ -150,7 +150,7 @@ class TripleoInventory(object): 'hosts': self._hosts(['undercloud']), 'vars': { 'ansible_host': 'localhost', - 'ansible_connection': 'local', + 'ansible_ssh_user': self.ansible_ssh_user, 'ansible_python_interpreter': sys.executable, # see https://github.com/ansible/ansible/issues/41808 'ansible_remote_tmp': '/tmp/ansible-${USER}', diff --git a/tripleo_common/tests/test_inventory.py b/tripleo_common/tests/test_inventory.py index 3b920c06d..451bf8267 100644 --- a/tripleo_common/tests/test_inventory.py +++ b/tripleo_common/tests/test_inventory.py @@ -198,7 +198,7 @@ class TestInventory(base.TestCase): 'redis_vip': 'x.x.x.6'}}, 'Undercloud': { 'hosts': ['undercloud'], - 'vars': {'ansible_connection': 'local', + 'vars': {'ansible_ssh_user': 'heat-admin', 'ansible_host': 'localhost', 'ansible_python_interpreter': sys.executable, 'ansible_remote_tmp': '/tmp/ansible-${USER}', @@ -272,7 +272,7 @@ class TestInventory(base.TestCase): 'redis_vip': 'x.x.x.6'}}, 'Undercloud': { 'hosts': ['undercloud'], - 'vars': {'ansible_connection': 'local', + 'vars': {'ansible_ssh_user': 'my-custom-admin', 'ansible_host': 'localhost', 'ansible_python_interpreter': 'foo', 'ansible_remote_tmp': '/tmp/ansible-${USER}', @@ -370,7 +370,7 @@ class TestInventory(base.TestCase): 'sh': {'children': {'CustomRole': {}}, 'vars': {'ansible_ssh_user': 'heat-admin'}}, 'Undercloud': {'hosts': {'undercloud': {}}, - 'vars': {'ansible_connection': 'local', + 'vars': {'ansible_ssh_user': 'heat-admin', 'ansible_host': 'localhost', 'ansible_python_interpreter': sys.executable,