# Prevent notify from restarting service if something else will

**URL:** <https://forum.ansible.com/t/prevent-notify-from-restarting-service-if-something-else-will/24729>\
**Category:** Ansible Project\
**Created:** [June 14, 2017, 10:11pm UTC](https://forum.ansible.com/t/prevent-notify-from-restarting-service-if-something-else-will/24729 "2017-06-14T22:11:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gilberto\_Valentin](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@Gilberto\_Valentin](https://forum.ansible.com/u/Gilberto_Valentin)\
**Post date:** [June 14, 2017, 10:11pm UTC](https://forum.ansible.com/t/prevent-notify-from-restarting-service-if-something-else-will/24729/1 "2017-06-14T22:11:58Z")

</div>

I have the following playbook:

`

---

<div class="post-metadata">

**Author:** ![Gilberto\_Valentin](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@Gilberto\_Valentin](https://forum.ansible.com/u/Gilberto_Valentin)\
**Post date:** [June 15, 2017, 4:58pm UTC](https://forum.ansible.com/t/prevent-notify-from-restarting-service-if-something-else-will/24729/2 "2017-06-15T16:58:56Z")

</div>

With the help of members of the IRC #ansible channel, I was able to solve my logic. What I ended up doing was removing the following task:

`

- name: Enable and start app  
systemd:  
name: guest  
enabled: yes  
state: started  
daemon\_reload: yes  
`

Then, I modified the handler for **nofity: GUEST service restart** to include “enabled: yes | state: restarted | daemon\_reload: yes”. This way when it goes through any of the items in the loop, if it sees the change, it’ll restart and reload regardless.
