# What is the difference between \`notify\` and just a task at the end of a playbook?

**URL:** <https://forum.ansible.com/t/what-is-the-difference-between-notify-and-just-a-task-at-the-end-of-a-playbook/15127>\
**Category:** Ansible Project\
**Created:** [May 1, 2014, 9:00am UTC](https://forum.ansible.com/t/what-is-the-difference-between-notify-and-just-a-task-at-the-end-of-a-playbook/15127 "2014-05-01T09:00:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrei\_Pashkin](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Andrei\_Pashkin](https://forum.ansible.com/u/Andrei_Pashkin)\
**Post date:** [May 1, 2014, 9:00am UTC](https://forum.ansible.com/t/what-is-the-difference-between-notify-and-just-a-task-at-the-end-of-a-playbook/15127/1 "2014-05-01T09:00:18Z")

</div>

Hi!  
I just started to learn Ansible.  
In [the docs](http://docs.ansible.com/playbooks_intro.html), there is such words:

> These ‘notify’ actions are triggered at the end of each block of tasks in a playbook, and will only be triggered once even if notified by multiple different tasks.
> 
> For instance, multiple resources may indicate that apache needs to be restarted because they have changed a config file, but apache will only be bounced once to avoid unnecessary restarts.

Is it correct, that if I want that apache to be restarted after certain task, not after all tasks, I need to insert task with restart action, after that task?

Docs also states:

> Handlers are lists of tasks, not really any different from regular tasks…

Is it all means, that there is no difference between notify and if I just put special tasks )with restarts etc) in the end of a playbook?

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [May 1, 2014, 5:12pm UTC](https://forum.ansible.com/t/what-is-the-difference-between-notify-and-just-a-task-at-the-end-of-a-playbook/15127/2 "2014-05-01T17:12:01Z")

</div>

Handlers are typically more useful in that multiple tasks can trigger them via the notify: action, so they will only run if the task has changed. Otherwise, the task will always run and you may bounce services unnecessarily.
