# Custom message with assert?

**URL:** <https://forum.ansible.com/t/custom-message-with-assert/18814>\
**Category:** Ansible Project\
**Created:** [July 21, 2015, 3:00pm UTC](https://forum.ansible.com/t/custom-message-with-assert/18814 "2015-07-21T15:00:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpburnz](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@cpburnz](https://forum.ansible.com/u/cpburnz)\
**Post date:** [July 21, 2015, 3:00pm UTC](https://forum.ansible.com/t/custom-message-with-assert/18814/1 "2015-07-21T15:00:14Z")

</div>

The title to the [assert](http://docs.ansible.com/ansible/assert_module.html) command is “Fail with custom message”. However, no where do I see a parameter for a custom message. Is it possible to specify a custom message? The [fail](http://docs.ansible.com/ansible/fail_module.html) command has the same title and supports a custom message via the _msg_ parameter.

---

<div class="post-metadata">

**Author:** ![chris\_brinley](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@chris\_brinley](https://forum.ansible.com/u/chris_brinley)\
**Post date:** [August 17, 2015, 6:30pm UTC](https://forum.ansible.com/t/custom-message-with-assert/18814/2 "2015-08-17T18:30:30Z")

</div>

I came to the same thought based on the doc title and lack of msg var being specified in doc. At least as of version 1.9.2 (and it looks like probably going back since its inception based on git history) msg: var is actually supported but the doc is not complete. The code for assert module actually checks for a msg var and uses it if present.

the following playbook works as a test case
