From 36d0f5c3bd3b75d655ebb9449ed8d51fdd406f9d Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 30 Mar 2020 10:53:03 -0400 Subject: [PATCH] Set scp_if_ssh to True in ansible.cfg 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. Change-Id: I637d850d0de75e60835d229b36b85e699b037543 Closes-Bug: #1869735 --- tripleo_common/actions/ansible.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tripleo_common/actions/ansible.py b/tripleo_common/actions/ansible.py index 66e38e201..9f4539f9b 100644 --- a/tripleo_common/actions/ansible.py +++ b/tripleo_common/actions/ansible.py @@ -134,6 +134,8 @@ def write_default_ansible_cfg(work_dir, os.path.join(work_dir, 'ansible-ssh')) config.set('ssh_connection', 'retries', '8') config.set('ssh_connection', 'pipelining', 'True') + # Related to https://github.com/ansible/ansible/issues/22127 + config.set('ssh_connection', 'scp_if_ssh', 'True') # Set connection info in config file so that subsequent/nested ansible # calls can re-use it