title: about ansible, Permission denied when trying to execute a script
body: <p>i am newbee with ansible, so i am getting an error when trying to run my own playbook.</p>
  
  <p>My playbook fails with this action:</p>
  
  <pre><code># run check-feed-adapter-folders script. the script tries to create some folders on HDFS.
  - command: "{{check_feed_adapter_folders_outputpath}}/check.sh"
  </code></pre>
  
  <p>This is the output of the ansible-playbook command:</p>
  
  <pre><code>TASK: [command {{check_feed_adapter_folders_outputpath}}/check-feed.sh] *******
  &lt;127.0.0.1&gt; REMOTE_MODULE command /var/app/check-feed-adapter-folders/check-feed.sh
  &lt;127.0.0.1&gt; EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1423231416.19-167270274703096 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1423231416.19-167270274703096']
  &lt;127.0.0.1&gt; PUT /tmp/tmpvB4uTB TO /root/.ansible/tmp/ansible-tmp-1423231416.19-167270274703096/command
  &lt;127.0.0.1&gt; EXEC ['/bin/sh', '-c', u'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1423231416.19-167270274703096/command; rm -rf /root/.ansible/tmp/ansible-tmp-1423231416.19-167270274703096/ &gt;/dev/null 2&gt;&amp;1']
  failed: [127.0.0.1] =&gt; {"cmd": "/var/app/check-feed-adapter-folders/check-feed.sh", "failed": true, "rc": 13}
  msg: [Errno 13] Permission denied
  
  FATAL: all hosts have already failed -- aborting
  </code></pre>
  
  <p>It is weird because if i try to run manually the script, it works perfectly</p>
  
  <pre><code>[root@dub-vcd-vms171 core2door.ansible]# sh /var/app/check-feed-adapter-folders/check-feed.sh     [INFO][CheckTopologyFolder][2015-02-06 14:05:32] CheckFeedFolder:41 - Started main method CheckTopologyFolder. param1: /var/app/feed-adapter/feed-adapter-SIP-Pub.properties
  [INFO][CheckTopologyFolder][2015-02-06 14:05:32] CheckFeedFolder:47 - Trying to create the folder on HDFS
  [INFO][CheckTopologyFolder][2015-02-06 14:05:32] MyHadoopUtils:28 - Started using hdfs://dub-vcd-vms169.global.tektronix.net:8020/
  [WARN][CheckTopologyFolder][2015-02-06 14:05:33] NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  </code></pre>
  
  <p>If i try to change command by shell, the same error:</p>
  
  <pre><code>failed: [127.0.0.1] =&gt; {"changed": true, "cmd": "/var/app/check-feed-adapter-folders/check-feed.sh", "delta": "0:00:00.004738", "end": "2015-02-06 14:12:10.257034", "rc": 126, "start": "2015-02-06 14:12:10.252296", "warnings": []}
  stderr: /bin/sh: /var/app/check-feed-adapter-folders/check-feed.sh: Permission denied
  
  FATAL: all hosts have already failed -- aborting
  </code></pre>
  
  <p>Can anybody help me?</p>