PLAY [localhost] ***************************************************************
TASK [run this command and ignore the result] **********************************
changed: [127.0.0.1]
TASK [debug] *******************************************************************
ok: [127.0.0.1] => {
"msg": "0"
}
TASK [run this command if everything is okey] **********************************
changed: [127.0.0.1]
TASK [debug] *******************************************************************
ok: [127.0.0.1] => {
"output": {
"changed": true,
"cmd": "echo \"What a wonderful world\"",
"delta": "0:00:00.001372",
"end": "2016-08-18 11:16:11.745843",
"rc": 0,
"start": "2016-08-18 11:16:11.744471",
"stderr": "",
"stdout": "What a wonderful world",
"stdout_lines": [
"What a wonderful world"
],
"warnings": []
}
}
TASK [run this command and ignore the result] **********************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "failed": true, "rc": 1, "stderr": "", "stdout": "PING 8.8.8.7 (8.8.8.7) 56(84) bytes of data.\r\n\r\n--- 8.8.8.7 ping statistics ---\r\n1 packets transmitted, 0 received, 100% packet loss, time 0ms\r\n\r\n", "stdout_lines": ["PING 8.8.8.7 (8.8.8.7) 56(84) bytes of data.", "", "--- 8.8.8.7 ping statistics ---", "1 packets transmitted, 0 received, 100% packet loss, time 0ms", ""]}
...ignoring
TASK [debug] *******************************************************************
ok: [127.0.0.1] => {
"msg": "1"
}
TASK [run this command if something wrong] *************************************
ok: [127.0.0.1]
TASK [debug] *******************************************************************
ok: [127.0.0.1] => {
"output2": {
"changed": false,
"rc": 0,
"stderr": "",
"stdout": "Something goes wrong :)\r\n",
"stdout_lines": [
"Something goes wrong :)"
]
}
}
PLAY RECAP *********************************************************************
127.0.0.1 : ok=8 changed=2 unreachable=0 failed=0