Is the SSH SFTP subsystem required on the managed nodes for Ansible to work?

Solution 1:

Yes, ansible depends on being able to transfer files to the remote machine. It uses sftp to do this by default. You can override this to use scp using

scp_if_ssh
Occasionally users may be managing a remote system that doesn’t have SFTP enabled. If set to True, we can cause scp to be used to transfer remote files instead:

scp_if_ssh=False
There’s really no reason to change this unless problems are encountered, and then there’s also no real drawback to managing the switch. Most environments support SFTP by default and this doesn’t usually need to be changed.

The above information was taken from this page:

http://docs.ansible.com/intro_configuration.html#openssh-specific-settings

Solution 2:

Here's what I ended up doing:

  1. Copied /etc/ansible/ansible.cfg to ~/.ansible.cfg
  2. Edited ~/.ansible.cfg.
  3. Changed #scp_if_ssh = False to scp_if_ssh = True
  4. Added ssh_args = to [ssh_connection] section.
  5. Ran my command with -c SSH flag

Thanks to Fred the Magic Wonder Dog for pointing me in the right direction.