Dealing with a half-expected error

3 views
Skip to first unread message

Karl Auer

unread,
Feb 15, 2019, 5:38:39 PM2/15/19
to ansible-project
I've got some code that adds a rule to an AWS security group using the ec2_group module. The problem is that if the rule I am adding already exists, Ansible throws an error.

I am a bit puzzled as to why; normally Ansible would just say "good, it's there already, job done", but in this case it objects. It's always going to fail on all but the first run.

How can I field an error, inspect it, and then continue with the playbook if I so choose?

Regards, K.

--
Karl Auer

Email  : ka...@2pisoftware.com
Website: http://2pisoftware.com


GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA

Reply all
Reply to author
Forward
0 new messages