Browse Source

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
changes/17/634617/6
Steve Baker 3 years ago
parent
commit
d879b2aa99
  1. 2
      tripleo_common/inventory.py
  2. 6
      tripleo_common/tests/test_inventory.py

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

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

Loading…
Cancel
Save