Use ssh in generated inventory for undercloud

This switches over to ssh for external deploy tasks, so they are run
in the context of the undercloud host instead of inside the
mistral-executor container.

Change-Id: Iae415339308a93ad49eeb7e4d7e0be2662abf0ee
Closes-Bug: #1813832
This commit is contained in:
Steve Baker 2019-02-04 10:45:01 +13:00
parent c1341fc4d1
commit d879b2aa99
2 changed files with 4 additions and 4 deletions

View File

@ -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}',

View File

@ -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,