# notify can't be expanded

**URL:** <https://forum.ansible.com/t/notify-cant-be-expanded/13732>\
**Category:** Ansible Project\
**Created:** [October 21, 2013, 4:01pm UTC](https://forum.ansible.com/t/notify-cant-be-expanded/13732 "2013-10-21T16:01:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Candler](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Brian\_Candler](https://forum.ansible.com/u/Brian_Candler)\
**Post date:** [October 21, 2013, 4:01pm UTC](https://forum.ansible.com/t/notify-cant-be-expanded/13732/1 "2013-10-21T16:01:26Z")

</div>

Is it intentional that I can’t notify a handler with a dynamic name?

==\> roles/idmapd/tasks/main.yml \<==

---

<div class="post-metadata">

**Author:** ![Brian\_Candler](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Brian\_Candler](https://forum.ansible.com/u/Brian_Candler)\
**Post date:** [October 21, 2013, 4:08pm UTC](https://forum.ansible.com/t/notify-cant-be-expanded/13732/2 "2013-10-21T16:08:18Z")

</div>

The other thing which is odd is that if a handler does not exist, this is not reported as an error until there is an attempt to call it.

changed: [[storage9.example.com](http://storage9.example.com)]  
ERROR: change handler (restart iptables) is not defined

This is a pain because a change was made, but the handler not run. This means that after the handler is corrected, the next playbook run _won’t_ trigger it because it things the change has already been made.

I haven’t reported this as a bug because it may be intentional behaviour. The only reason I can see for _not_ checking statically that each ‘notify’ line points to a valid handler is if the notify can be generated dynamically - but it appears it cannot.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [October 22, 2013, 1:22am UTC](https://forum.ansible.com/t/notify-cant-be-expanded/13732/3 "2013-10-22T01:22:12Z")

</div>

“Is it intentional that I can’t notify a handler with a dynamic name?”

Yes.
