I need to stop and then start a python script on numerous remote servers. I set up a vm in our test environment to walk through this. The 'remote server' has a simple python script (test.py) in /test directory:
#!/usr/bin/env python while True: print "running\n" my playbook has a hosts file: [servers] 192.168.2.31 which is the IP of the 'remote host' in the test environment. I have tried the playbook several ways, using shell, script and command to execute test.py, shell and script didn't work, command did but then the playbook hangs: --- - name: test stop and start test.py hosts: servers tasks: - name: kill pyscript shell: pkill -f test.py - name: start script command: python /test/test/py This works, sort of but not really :-) test.py gets killed, sure enough, and "start script" in the playbook executes, but then ansible just sits there, Ho-Ho-Ho-ing me. TASK: [start script] ***************************************** For oooh long time until I give up and Control-C it. It is executing though, because when I go to the 'remote server' test.py is indeed running. What the heck am I missing???? -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fc1b637b-460c-4a0d-9249-001e47008a76%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.