Hi List,
I’m trying to add the “-i” sudo option to the sudo_flags= configuration option in the ansible.cfg like so:
the default flags passed to sudo
sudo_flags=-Hi
This is because I want some things to run under the oracle user in my playbook, meaning it needs it’s environment set properly (Like ORACLE_HOME)
But when I add the option, ansible does not even go past “GATHERING FACTS”:
mmaas@xmgtansible:~/playbooks$ ansible-playbook binck/site.yml --extra-vars hosts=t2wwwkripke --tags=users-dba -vvvvv
sudo password:
PLAY [t2wwwkripke] *********************
GATHERING FACTS *********************
ESTABLISH CONNECTION FOR USER: mmaas on PORT 22 TO t2wwwkripke
EXEC /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-1360227274.82-278808592316494 && chmod a+rx $HOME/.ansible/tmp/ansible-1360227274.82-278808592316494 && echo $HOME/.ansible/tmp/ansible-1360227274.82-278808592316494’
REMOTE_MODULE setup
PUT /tmp/tmp4SHl9r TO /home/mmaas/.ansible/tmp/ansible-1360227274.82-278808592316494/setup
EXEC /bin/sh -c ‘sudo -k && sudo -Hi -S -p “[sudo via ansible, key=ijizcovnimrhdctfmrswznnvqgfpibhz] password: " -u root /bin/sh -c '”’“‘/usr/bin/python /home/mmaas/.ansible/tmp/ansible-1360227274.82-278808592316494/setup; rm -rf /home/mmaas/.ansible/tmp/ansible-1360227274.82-278808592316494/ >/dev/null 2>&1’”‘"’’
At that point I have to CTRL-c to stop the playbook run.
The ansible version is 1.1
Any suggestions? Thanks!