Description of problem: When running ansible playbook from [1], ansible fails on facts collection about hosts: ERROR! SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh [1] https://github.com/kubernetes/contrib/blob/master/ansible/setup.sh Version-Release number of selected component (if applicable): ansible-2.0.2.0-1.fc23.noarch How reproducible: always Steps to Reproduce: Can provide steps if necessary. It takes some effort to create cluster and update ansible vars. Additional info: The issues is reported upstream and already with fix [1]. Recommendation is to uncomment scp_if_ssh = True line in /etc/ansible/ansible.cfg. It is worth considering to uncomment the line by default. [1] https://github.com/ansible/ansible/issues/13401
I'm checking with upstream to see if changing that config option has undesireable side effects or if there's some idea of a actual fix landing.
tldr; code fix proposed in: https://github.com/ansible/ansible/pull/15829 After a few days of discussing this we have three workarounds and a potential patch to actually fix the issue. The three workarounds are: * scp_if_ssh = True (Some sites do not have scp so this won't work there. bcoca thinks scp is less resistant to errors during transport of the data than sftp so he thinks it's only a workaround, not something we should change by default). If you're site has scp but not sftp then you should not suffer from this. * sftp_batch_mode = False (this can lead to cornercases where sftp will fail while copying a file but not alert ansible to the fact. So ansible will report that the task succeeded but in reality it will have failed. This is the case I know that this cornercase applies: $ touch /var/tmp/download $ chmod a-w /var/tmp/download $ ansible remotehost -m fetch -a 'src=/etc/fedora-release dest=/var/tmp/download flat=yes' * Use ansible_connection=paramiko instead of ansible_connection=ssh for this transfer. https://github.com/ansible/ansible/pull/15829 has a proposed fix. Setting -oBatchMode=no when using -b tells sftp to prompt for a password even though it takes a batch file (and as a side effect gives more error messages). This appears to have no drawbacks. We're going to test and if all goes well, merge that for the 2.1 release. It should be easy to backport if we're anxious to get it into the Fedora package prior to upstream releasing 2.1.0.
ansible-2.1.0.0-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1f9a2eb8d7
ansible-2.1.0.0-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d31dacfabf
ansible-2.1.0.0-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-5a1e887dfc
ansible-2.1.0.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-aceff68672
ansible-2.1.0.0-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9b87ab9c77
ansible-2.1.0.0-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9b87ab9c77
ansible-2.1.0.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-aceff68672
ansible-2.1.0.0-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1f9a2eb8d7
ansible-2.1.0.0-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d31dacfabf
ansible-2.1.0.0-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-5a1e887dfc
ansible-2.1.0.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
ansible-2.1.0.0-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
ansible-2.1.0.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
ansible-2.1.0.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
ansible-2.1.0.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
I ran into this problem on Openshift 3.11. Exporting ANSIBLE_SCP_IF_SSH=y fixed this.