Merge "Switch ansible tmp for local connections"

This commit is contained in:
Zuul 2018-06-28 06:16:01 +00:00 committed by Gerrit Code Review
commit ea44ebe886
4 changed files with 10 additions and 0 deletions

View File

@ -221,6 +221,7 @@ class AnsibleAction(actions.Action):
self.ssh_private_key)
env_variables = {
'HOME': self.work_dir,
'ANSIBLE_LOCAL_TEMP': self.work_dir,
'ANSIBLE_CONFIG': ansible_config_path
}
@ -482,6 +483,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
self.ssh_private_key)
env_variables = {
'HOME': self.work_dir,
'ANSIBLE_LOCAL_TEMP': self.work_dir,
'ANSIBLE_CONFIG': ansible_config_path,
}

View File

@ -159,6 +159,8 @@ class TripleoInventory(object):
'vars': {
'ansible_host': 'localhost',
'ansible_connection': 'local',
# see https://github.com/ansible/ansible/issues/41808
'ansible_remote_tmp': '/tmp/ansible-${USER}',
'auth_url': self.auth_url,
'cacert': self.cacert,
'os_auth_token':

View File

@ -55,6 +55,7 @@ class AnsibleActionTest(base.TestCase):
env = {
'HOME': action.work_dir,
'ANSIBLE_LOCAL_TEMP': action.work_dir,
'ANSIBLE_CONFIG': ansible_config_path
}
@ -105,6 +106,7 @@ class AnsiblePlaybookActionTest(base.TestCase):
pb = os.path.join(action.work_dir, 'playbook.yaml')
env = {
'HOME': action.work_dir,
'ANSIBLE_LOCAL_TEMP': action.work_dir,
'ANSIBLE_CONFIG': ansible_config_path,
'ANSIBLE_CALLBACK_WHITELIST': 'profile_tasks',
'PROFILE_TASKS_TASK_OUTPUT_LIMIT': '0',

View File

@ -213,6 +213,7 @@ class TestInventory(base.TestCase):
'hosts': ['undercloud'],
'vars': {'ansible_connection': 'local',
'ansible_host': 'localhost',
'ansible_remote_tmp': '/tmp/ansible-${USER}',
'auth_url': 'xyz://keystone.local',
'cacert': 'acacert',
'os_auth_token': 'atoken',
@ -281,6 +282,7 @@ class TestInventory(base.TestCase):
'hosts': ['undercloud'],
'vars': {'ansible_connection': 'local',
'ansible_host': 'localhost',
'ansible_remote_tmp': '/tmp/ansible-${USER}',
'auth_url': 'xyz://keystone.local',
'cacert': 'acacert',
'os_auth_token':
@ -377,6 +379,8 @@ class TestInventory(base.TestCase):
'Undercloud': {'hosts': {'undercloud': {}},
'vars': {'ansible_connection': 'local',
'ansible_host': 'localhost',
'ansible_remote_tmp':
'/tmp/ansible-${USER}',
'auth_url': 'xyz://keystone.local',
'cacert': 'acacert',
'os_auth_token': 'atoken',