You 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


On Wednesday, May 7, 2014 2:52:52 PM UTC+2, Anand Buddhdev wrote:
>
> I'm running ansible 1.5.5 against a CentOS 6 server, and trying to use the 
> "service" module to manage an upstart job. However, I keep getting this 
> error from ansible:
>
> $ ansible bastion3.hadoop.ripe.net -i svn/gii/ansible_hosts -sK -m 
> service -a 'name=hdfs-sync state=stopped' 
> sudo password: 
> bastion3.hadoop.ripe.net | FAILED => failed to parse: 
> SUDO-SUCCESS-mwcdqmpymyognbdmbrqkqbkccfdmzwqs 
> Traceback (most recent call last): 
> File "/tmp/ansible-tmp-1399466909.49-7501828270786/service", line 2305, in 
> <module> 
> main() 
> File "/tmp/ansible-tmp-1399466909.49-7501828270786/service", line 1170, in 
> main 
> service.get_service_status() 
> File "/tmp/ansible-tmp-1399466909.49-7501828270786/service", line 480, in 
> get_service_status 
> rc, status_stdout, status_stderr = self.service_control() 
> File "/tmp/ansible-tmp-1399466909.49-7501828270786/service", line 722, in 
> service_control 
> rc_state, stdout, stderr = self.execute_command("%s %s %s" % (self.action, 
> self.name, arguments), daemonize=True) 
> File "/tmp/ansible-tmp-1399466909.49-7501828270786/service", line 250, in 
> execute_command 
> return json.loads(data) 
> File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads 
> return _default_decoder.decode(s) 
> File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode 
> obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 
> File "/usr/lib64/python2.6/json/decoder.py", line 338, in raw_decode 
> raise ValueError("No JSON object could be decoded") 
> ValueError: No JSON object could be decoded
>
> If I log into the server, and run "stop hdfs-sync" or "status hdfs-sync" 
> or "start hdfs-sync" it all works. My ansible setup also works against 
> other CentOS 6 boxes just fine, and can start, stop and restart other 
> upstart jobs just fine. So this is a weird case. How can I debug this more, 
> and find out why ansible is failing with this specific upstart job on this 
> server.
>
> Anand
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9b7ff3e7-dc24-4da8-ba80-cd8aeaf1aea0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to