I’m getting the same type of error trying to run the openstack playbook from a mac 10.8 to a company network server running centOS 6.4.
I installed sshpass on both the openstackserver and my mac.
I have ssh-keygen 'd on my mac as kbroughton and then
mac$ ssh-copy-id root@openstackserver
verifying
openstackserver$ cat /root/.ssh/authorized_keys
i see the public key for my kbroughton
mac$ ssh-agent bash
mac$ ssh-add ~/.ssh/authorized_keys
mac$ ansible-playbook -i hosts site.yml
fatal: [10.0.9.170] => failed to transfer file to /setup:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Connection closed
I can do passwordless ssh to root@openstackserver. Trying to skirt the ssh-agent:
ansible-playbook -i hosts site.yml --ask-pass
ansible-playbook -vvv --ask-pass -i hosts site.yml -c ssh
<10.0.9.172> REMOTE_MODULE setup
<10.0.9.170> REMOTE_MODULE setup
<10.0.9.172> PUT /var/folders/t2/h22337c12hn279xwd4s9fk7s8_088c/T/tmpEKNksK TO /setup
<10.0.9.170> PUT /var/folders/t2/h22337c12hn279xwd4s9fk7s8_088c/T/tmpz2Vb82 TO /setup
fatal: [10.0.9.170] => failed to transfer file to /setup:
Permission denied, please try again.
suggestions?