From dc719c7cfdc899a1eb79e5f23a2f08b5118a6d9d Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 30 Mar 2020 10:02:02 -0500 Subject: [PATCH] Set scp_if_ssh to True in ansible client configuration To avoid the warning "sftp transfer mechanism failed" during Ansible run (also reported here: https://github.com/ansible/ansible/issues/22127); let's set scp_if_ssh to True. The default is False; which means it'll first try sftp (which fails since we use pipeline) and fallback on scp. To avoid the warning, let's set it to True directly, so we use scp. Closes-Bug: #1869735 Change-Id: I5474b45f4bbe15780370a23d587dea7dd811c073 Signed-off-by: Kevin Carter --- tripleoclient/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index 44dcea21a..1a8baa07e 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -412,6 +412,7 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None, env['ANSIBLE_GATHER_TIMEOUT'] = 45 env['ANSIBLE_SSH_RETRIES'] = 3 env['ANSIBLE_PIPELINING'] = True + env['ANSIBLE_SCP_IF_SSH'] = True env['ANSIBLE_REMOTE_USER'] = ssh_user env['ANSIBLE_STDOUT_CALLBACK'] = output_callback env['ANSIBLE_LIBRARY'] = os.path.expanduser(