ANSIBLE_KEEP_REMOTE_FILES=1
python -m trace --trace script.pyYou could set an environment variable:ANSIBLE_KEEP_REMOTE_FILES=1
and run ansible again. Once it fails, see what files were executed, log into the remote host and run the failed python script with:python -m trace --trace script.py
Actually, this looks like a bug that occurred with script and raw in some earlier versions of Ansible where the sudo success string was being leaked back. It was fixed, I'm now wondering if it was reverted in this case...Can you upgrade to 1.6.1 and try it again?
$ ansible --version
ansible 1.6.1
$ ansible bastion3.hadoop.ripe.net -sK -m service -a 'name=hdfs-sync state=restarted'
sudo password:
bastion3.hadoop.ripe.net | FAILED => failed to parse:
SUDO-SUCCESS-dawyrikofupcjoyftolafyddywphopwj
Traceback (most recent call last):
File "/tmp/ansible-tmp-1399582444.03-10583586416099/service", line 2411, in <module>
main()
File "/tmp/ansible-tmp-1399582444.03-10583586416099/service", line 1198, in main
service.get_service_status()
File "/tmp/ansible-tmp-1399582444.03-10583586416099/service", line 509, in get_service_status
rc, status_stdout, status_stderr = self.service_control()
File "/tmp/ansible-tmp-1399582444.03-10583586416099/service", line 750, in service_control
rc_state, stdout, stderr = self.execute_command("%s %s %s" % (self.action, self.name, arguments), daemonize=True)
File "/tmp/ansible-tmp-1399582444.03-10583586416099/service", line 250, in execute_command
On Thursday, 8 May 2014 22:50:26 UTC+2, Adam Morris wrote:Actually, this looks like a bug that occurred with script and raw in some earlier versions of Ansible where the sudo success string was being leaked back. It was fixed, I'm now wondering if it was reverted in this case...Can you upgrade to 1.6.1 and try it again?Hi Adam, it still fails:$ ansible --version
ansible 1.6.1
$ ansible bastion3.hadoop.ripe.net -sK -m service -a 'name=hdfs-sync state=restarted'
sudo password:
bastion3.hadoop.ripe.net | FAILED => failed to parse:
SUDO-SUCCESS-dawyrikofupcjoyftolafyddywphopwj
There is an open bug report https://github.com/ansible/ansible/issues/7319 which sounds very similar...
Do you need to provide a password to use sudo on the remote host? Do you need to use sudo? I'm curious because that first line SUDO-SUCCESS ... should be being eaten by part of ansible...
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK5eLPTpkyq0gzPCQq%2BiR1Fz_CMMJ3tRweRzy2vLO9BC7Szi%3Dw%40mail.gmail.com.
This isn't an upstart script is it?
I saw something very very similar if I tried to set enabled=no on an
upstart-managed
service on CentOS a few weeks back. Removing that clause made it work.
This is a traceback in the service module, certaintly.
Please be sure there's a ticket open and if you don't have the same issue, file a new ticket, and we'll look into this promptly.