In my ansible.cfg I had the following set:

[defaults]
transport=smart

[ssh_connection]
scp_if_ssh=True

For one of my target hosts (specifically a VMware vCenter appliance) I 
received a SFTP disabled error.  After investigating this host did in fact 
have SFTP disabled (on purpose).  I am curious about a few things.

1) why is the paramiko python ssh lib defaulting to SFTP for file transfer? 
 Is this intended?  Is it more efficient?

2) Wouldn't it make sense for the ansible connection module to detect this 
failure and alternatively try to use SCP to transfer the file?

In the end I had to force the host to use SSH (ansible_connection=ssh in my 
inventory file) and then change 

From:
ssh_args = -o ControlMaster=auto -o ControlPersist=60s

To:
ssh_args = -o ControlMaster=auto

to get everything to work.  It seems ansible is smart enough to detect 
which features the particular flavor of sshd supports when ssh transport is 
used.  It seems the connection module using paramiko might be able to 
determine if SFTP is disabled and fail over to SCP.


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3b35bbab-d2aa-4da8-ad01-1ed2a866c8bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to