Getting error while running below playbook. The python script is on my master and I want it to run on two slaves. No idea what's wrong.
luckee@zarvis:~/playbooks$ ansible-playbook runscript.yml
PLAY [droplets] ****************************************************************
TASK [setup] *******************************************************************
ok: [CentOS1]
ok: [CentOS2]
TASK [Run python script] *******************************************************
fatal: [CentOS1]: FAILED! => {"changed": false, "cmd": "/home/luckee/python/userfind.py", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}
fatal: [CentOS2]: FAILED! => {"changed": false, "cmd": "/home/luckee/python/userfind.py", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @runscript.retry
PLAY RECAP *********************************************************************
CentOS1 : ok=1 changed=0 unreachable=0 failed=1
CentOS2 : ok=1 changed=0 unreachable=0 failed=1
luckee@zarvis:~/playbooks$
Here is the playbook.
---
- hosts: droplets
remote_user: root
tasks:
- name: Run python script
command: /home/luckee/python/userfind.py
...
Looking forward for your help !
No such file or directory. Try double check the file paths?