roles/files - remote copy configuration

123 views
Skip to first unread message

Abhishek R.

unread,
Jul 23, 2015, 11:49:20 PM7/23/15
to Ansible Project
Hi,

My ansible project has a role with a shell script (say, transferTempScript.sh) in the <role_name>/files subdirectory. The playbook has become:yes and a become sudo user specified. When running the playbook, I get an error stating - transferTempScript.sh: command not found.

I tracked it down to the manner in which ansible copied the script file over to the remote node. Following is the console output related to it -

<host> EXEC sshpass -d15 ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/tmp/ansible_tower_1_1P9q/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no -o PubkeyAuthentication=no -o User=c1340941 -o ConnectTimeout=10 host /bin/sh -c 'mkdir -p /tmp/ansible-tmp-1437708704.47-93756423468950 && chmod a+rx /tmp/ansible-tmp-1437708704.47-93756423468950 && echo /tmp/ansible-tmp-1437708704.47-93756423468950'
<host> PUT /var/lib/awx/projects/transferTemp/roles/transfer_role/files/transferTempScript.sh TO transferTempScript.sh

The shell is being copied over to the user's home directory, rather than in the /tmp/ansible... directory being created upon ssh in the first line. What could be causing this and where can I modify its configuration? I've already looked up the /etc/ansible/ansible.cfg and it appears fine. There are no other overriding configurations. 

Any suggestion is greatly appreciated.

Regards

Brian Coca

unread,
Jul 24, 2015, 12:05:11 AM7/24/15
to Ansible Project
This mailing list is for ansible the OSS project, for tower related
issues please go to support.ansible.com or email sup...@ansible.com


--
Brian Coca
Reply all
Reply to author
Forward
0 new messages