When trying this on Solaris 11 server.
ansible --sudo -i hosts -m file -a “state=directory dest=/export/home/foo”
sudo password:
I kept getting this error:
| FAILED => ssh connection closed waiting for sudo or su password prompt
I tried putting this on /etc/sudoers:
Default;: !requiretty
Same error. But it disappear when I changed pipelinining to false in the ansible config file.
However, the sudo permissions needed are to execute bash, not mkdir.
"Sorry, user is not allowed to execute ‘/bin/bash -c echo SUDO-SUCCESS-xmmcizgbypydurtfuarqtsrufpgbwgoe; LC_CTYPE=C LANG=C…’
which is to ask a lot in my environment – banking – so it looks like for sudo operations I won’t be able to use Ansible sudo, but I will have to do it inside scripts and use the script module.
I suspect there is no way around this. Right?