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 <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2020-03-30 10:02:02 -05:00
parent 0379179dfd
commit dc719c7cfd
No known key found for this signature in database
GPG Key ID: CE94BD890A47B20A
1 changed files with 1 additions and 0 deletions

View File

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