# 'unsupported parameter for module: notify' error when trying to call notify from a task

**URL:** <https://forum.ansible.com/t/unsupported-parameter-for-module-notify-error-when-trying-to-call-notify-from-a-task/20628>\
**Category:** Ansible Project\
**Created:** [February 19, 2016, 9:20am UTC](https://forum.ansible.com/t/unsupported-parameter-for-module-notify-error-when-trying-to-call-notify-from-a-task/20628 "2016-02-19T09:20:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin\_Anderson](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Colin\_Anderson](https://forum.ansible.com/u/Colin_Anderson)\
**Post date:** [February 19, 2016, 9:20am UTC](https://forum.ansible.com/t/unsupported-parameter-for-module-notify-error-when-trying-to-call-notify-from-a-task/20628/1 "2016-02-19T09:20:36Z")

</div>

Hi,

I’m trying to run a playbook that installs and restarts a tomcat instance but when I run it it fails with the following message:

`TASK [tomcat-datagateway : Configure the tomcat-datagateway server.xml] ******** fatal: [10.10.1.3]: FAILED! => {"changed": true, "failed": true, "msg": "unsupported parameter for module: notify"}`

I have the following layout for the tomcat-datagateway role:

`  
roles/tomcat-datagateway/  
files/  
tomcat-datagateway (environment script)  
tomcat-datagateway.sh (init.d script)  
handlers/  
main.yml  
tasks/  
main.yml  
templates/  
server.xml  
tomcat-users.xml  
vars/  
main.yml

`

The relevant part of the tasks/main.yml looks like this (everything up until this point works fine):

`

- name: Configure the tomcat-datagateway server.xml  
template:  
src: server.xml  
dest: /home/apiproc/tomcat-datagateway/apache-tomcat-8.0.32/conf  
notify: restart tomcat-datagateway  
`

The handlers/main.yml looks like this:

`

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [February 20, 2016, 4:41pm UTC](https://forum.ansible.com/t/unsupported-parameter-for-module-notify-error-when-trying-to-call-notify-from-a-task/20628/2 "2016-02-20T16:41:13Z")

</div>

`notify` is indeed not a parameter of the `template` module.

Effectively this error is stating that you have indented your `notify` too far. It should be directly aligned with `template` and `name` and not nested under `template`

---

<div class="post-metadata">

**Author:** ![Colin\_Anderson](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Colin\_Anderson](https://forum.ansible.com/u/Colin_Anderson)\
**Post date:** [February 23, 2016, 5:55pm UTC](https://forum.ansible.com/t/unsupported-parameter-for-module-notify-error-when-trying-to-call-notify-from-a-task/20628/3 "2016-02-23T17:55:45Z")

</div>

Aah yes, that did the trick; lesson learned. Thanks.

Colin.
