Error Handling of Failed Task

4 views
Skip to first unread message

Mahmut Aydın

unread,
Mar 28, 2020, 4:46:19 PM3/28/20
to Ansible Project
Hello Dear All,

I am using a playbook  that gives below output intentionally. Is there any possible way that I can  write  this  FAILED statement to a file in order to  be used by another script?

thanks,


PLAY [CHECK USERS CORRECT] **************************************************************************************************************************************************************************************************************

TASK [collecting facts from CVP 172.16.91.3] ********************************************************************************************************************************************************************************************
fatal: [172.16.91.3]: FAILED! => {"changed": false, "msg": "\n172.16.91.3: Authenticate: http://172.16.91.3:443/web/login/authenticate.do: Request Error: Bad Request\n"}

PLAY RECAP ******************************************************************************************************************************************************************************************************************************
172.16.91.3                : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Reply all
Reply to author
Forward
0 new messages