Hi,
Ansible newbie here.
A very basic playbook.
---
- hosts: '{{ target }}'
gather_facts: no
su: yes
su_user: root
tasks:
- name: test listing files
command: ls
results in the following error. I've set the 'executable = /usr/bin/bash' as an --extra-var but no luck. It errors out with the same error with the default of '/bin/sh'
========================================================
<web> ESTABLISH CONNECTION FOR USER: mkerai on PORT 22 TO web
<web> REMOTE_MODULE command ls
<web> EXEC /usr/bin/bash -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1413270837.56-103954098701897 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1413270837.56-103954098701897 && echo $HOME/.ansible/tmp/ansible-tmp-1413270837.56-103954098701897'
<web-smflab> PUT /tmp/tmpbFkq90 TO /export/home/mkerai/.ansible/tmp/ansible-tmp-1413270837.56-103954098701897/command
<web-smflab> EXEC /bin/sh -c 'su root /usr/bin/bash -c '"'"'echo SUDO-SUCCESS-tvjdhmzkletdgahwveiexqkchkdisvsl; LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 /usr/bin/python /export/home/mkerai/.ansible/tmp/ansible-tmp-1413270837.56-103954098701897/command; rm -rf /export/home/mkerai/.ansible/tmp/ansible-tmp-1413270837.56-103954098701897/ >/dev/null 2>&1'"'"''
failed: [web-smflab] => {"failed": true, "parsed": false}
invalid output was:
/usr/bin/bash: syntax error at line 1: `(' unexpected
========================================================
Any pointers would be greatly appreciated.
Target OS : Solaris 10
Ansible Version : 1.6.6
Thank you
_Micky