# Porting from Ansible 2.19 to 2.14: unsafe conditionals

**URL:** <https://forum.ansible.com/t/porting-from-ansible-2-19-to-2-14-unsafe-conditionals/46545>\
**Category:** Get Help\
**Created:** [October 27, 2026, 6:34pm UTC](https://forum.ansible.com/t/porting-from-ansible-2-19-to-2-14-unsafe-conditionals/46545 "2026-10-27T18:34:12Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kks](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kks/32/10352_2.png) [@kks](https://forum.ansible.com/u/kks)\
**Post date:** [November 7, 2026, 7:36am UTC](https://forum.ansible.com/t/porting-from-ansible-2-19-to-2-14-unsafe-conditionals/46545/9 "2026-11-07T07:36:01Z")

</div>

I might be wrong in my assumption, but looks like you want to have several asserts with different fail messages in one assert action.  
There is a way to do that

> [@Different messages for different conditions in one assert](https://forum.ansible.com/t/different-messages-for-different-conditions-in-one-assert/45266):
>
> There was discussion during CfgMgmtCamp that it is not possible to have different messages for different conditions in one assert action with ansible. I do not agree with that! Here is the code: - name: Different messages for different conditions in one asserts hosts: localhost gather\_facts: false vars: one: true two: false tasks: - name: Simple assert ansible.builtin.assert: that: conditions is ansible.builtin.all fail\_msg: "One of the conditions fai…

> [@Different messages for different conditions in one assert](https://forum.ansible.com/t/different-messages-for-different-conditions-in-one-assert/45266/1):
>
> This code work with both ansible-core 2.20 and 2.16 (I’ve also checked other versions, here just for brevity)

Sorry if my assumption is incorrect. If you can share what you want to acually do, that might help to rewrite the code completely.

---

_[View the full topic](https://forum.ansible.com/t/porting-from-ansible-2-19-to-2-14-unsafe-conditionals/46545)._
