I am trying to run the following playbook to deploy a key to a number of 
servers

deploy_key.yml:

- hosts: servers
>   gather_facts: no
>   user: root
>   vars:
>   - key_file: /root/.ssh/id_rsa.pub
>   tasks:
>   - name: add authorized keys
>     authorized_key: user=root
>                     key="{{ item }}"
>     with_file:
>       - "{{ key_file }}"



in ansible.cfg i added the following line:

scp_if_ssh = True



from the command line I am executing the following command:

ansible-playbook -k deploy_key.yml


 As expected I am prompted for my password and it seems to authenticate but 
when the play is run I get the following error:

fatal: [m-vc] => failed to open a SFTP connection (Administratively 
> prohibited)



My understanding was that setting scp_if_ssh=True in the ansible.cfg file 
would force ansible to transfer files using scp instead of sftp.  I tried 
manually transferring a file on the command line using scp and it works 
fine.  Am I missing something here?

-- 
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/e1ec19b3-caed-4d6f-97cb-7bf612395bb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to