A way to check the error message returned by module in "msg"
21 views
Skip to first unread message
Co S
unread,
Jan 8, 2016, 9:01:59 AM1/8/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi All,
Is there any way to check the check the message error text returned by module in msg against some pattern?
I want to skip execution of next task if msg contains "LoadBalancerNotFound" string.
TASK:[elb |Wait ELB to deassociate from SG]********************************* failed:[127.0.0.1]=>{"attempts":0,"failed":true} msg:LoadBalancerNotFound:Cannot find LoadBalancer test
FATAL: all hosts have already failed -- aborting
Thanks,
Regards
Brian Coca
unread,
Jan 8, 2016, 10:20:08 AM1/8/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
use register to put the return info into a var, then you can use it to
scan for the match.