Check this.
https://docs.ansible.com/ansible/latest/modules/fail_module.html

You can perform custom actions when something fails. I guess there are also
ways to control if your job needs to fail or skip to next. I havent tried
it though, check out ansible docs.

*Regards,*
*Ankit*


On Fri, Dec 20, 2019 at 10:27 PM Vicky . <[email protected]> wrote:

> Hi,
>
> I have a use case where I am automating switch patching where engineers
> can select a switch name and playbook name from a web portal.
> I would to like to handle an exception if engineers select a wrong
> switch/playbook.
>
> But the problem is all the tasks are skipped if engineers select a wrong
> switch or wrong playbook which is expected.
>
> *But I want to make sure to send them a notification if this happens. Is
> there any way to do that?*
>
> Thank you in advance.
>
> Best wishes,
> Bikram
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAEFfMJQnG7vZ03Hbpxv%2BaXSOZjChP39vgN%2BNpk0_RSxmcvHDug%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAEFfMJQnG7vZ03Hbpxv%2BaXSOZjChP39vgN%2BNpk0_RSxmcvHDug%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACecUhu5AbFOFZ%3D9jJXEJuETC0pTGFOgrJACwFg%2BvLGUrDBOxA%40mail.gmail.com.

Reply via email to