# notify and handlers: in a role dont work

**URL:** <https://forum.ansible.com/t/notify-and-handlers-in-a-role-dont-work/18333>\
**Category:** Ansible Project\
**Created:** [May 28, 2015, 4:46pm UTC](https://forum.ansible.com/t/notify-and-handlers-in-a-role-dont-work/18333 "2015-05-28T16:46:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noam\_Greenberg](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Noam\_Greenberg](https://forum.ansible.com/u/Noam_Greenberg)\
**Post date:** [May 28, 2015, 4:46pm UTC](https://forum.ansible.com/t/notify-and-handlers-in-a-role-dont-work/18333/1 "2015-05-28T16:46:54Z")

</div>

Hi  
i think this is a bug but can be that i dont understand the Docs …

i have main play

```auto
- hosts: all
gather_facts: yes
user: root

vars_files:
- nagios/GlobalVar/main.yml
vars_prompt:
- name: password
prompt: "MYSQL Pass that you will use Enter password"
private: yes
tasks:
- set_fact: SQLPassword={{password}}
- group_by: key=OS-{{ansible_distribution}}

- hosts: OS-CentOS
gather_facts: no

vars_files:
- nagios/GlobalVar/main.yml
handlers:
- include: nagios/handlers/main.yml
roles:
- nagios/lamp
- nagios/nagios

```

as you can see i add include in the main.yml file i have

```auto
- name: restart httpd
service: name=httpd state=restarted

```

in the main task i have

```auto
- name: Create PHP Test Page and Test it
copy: src={{ PHPtestPage }} dest={{ PHPPath }} force=yes owner=root group=root mode="u=rw,g=r,o=r"
notify:
- restart httpd

```

and it is not restart the HTTPD server i dont understand why ?  
for the folder struct is like this

```auto
role --- > nagios --- > task1
----> task 2
---> hamdlers ----> main.yml

```

any help pleas 🙂
