After i added delegate_to:localhost, playbook ran successful but ‘ignored’ with no output.
Output error:
fatal: [switch1 → localhost]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“_raw_params”: “python test1.py”,
“_uses_shell”: false,
“argv”: null,
“chdir”: “/home/{username}/project1/reports/”,
“creates”: null,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}…
Output status:
“status”: “successful”,
“traceback”: “”,
“inventory”: “switch1”,
“project”: “project1”,
“playbook”: “test1.yml”,
“credential”: null,
“limit”: “”,
“extra_vars”: “{"username": "user1", "password": "$encrypted$"}”,
“hosts”: {
“switch1”: {
“failed”: false,
“changed”: 0,
“dark”: 0,
“failures”: 0,
“ok”: 2,
“processed”: 1,
“skipped”: 0,
“rescued”: 0,
“ignored”: 1
I think we can not use localhost, become switch1 is a remote device and once this playbook is successful, Similarly i need to run on more than 30 devices. Please suggest.