java install working in push mode but permission denied in pull mode

Hi All,

I have a task that installs java and is working fine in Ansible push mode but it seems to be failing in Ansible Pull mode:

java-install.yml
“”"

  • name: downloading java binary from s3
    shell: /usr/bin/s3cmd get s3://s3-installs/packages/jdk-{{ JDK_VERSION }}-linux-x64-rpm.bin --force {{ DOWNLOAD_DIR }}/

  • name: making java binary executable
    file: dest={{ DOWNLOAD_DIR }}/jdk-{{ JDK_VERSION }}-linux-x64-rpm.bin mode=0544

  • name: Installing Java
    shell: yes | {{ DOWNLOAD_DIR }}/jdk-*-linux-x64-rpm.bin
    sudo: yes

“”"

Error :
“”"

TASK: [feed-etl | Installing Java] ********************************************
failed: [localhost] => {“changed”: true, “cmd”: "yes | /root/packages/jdk-*-linux-x64-rpm.bin ", “delta”: “0:00:00.014816”, “end”: “2013-11-05 16:41:06.613563”, “item”: “”, “rc”: 126, “start”: “2013-11-05 16:41:06.598747”}
stderr: /bin/sh: /root/packages/jdk-6u26-linux-x64-rpm.bin: Permission denied
yes: standard output: Broken pipe
yes: write error

FATAL: all hosts have already failed – aborting

“”"

I’m running ansible-pull as root and the master playbook used as argument in ansible-pull has user:root and sudo:yes define d:

“”"

Your mask is probably different and the .bin file is not executable in pull
mode, I would add a task after download and before execution to ensure this
or set the mask on download to ensure it is executable.

using the .bin file aboslue path in pull mode seem to have fixed the problem .

Thanks.