# Did something changed in how handlers are called?

**URL:** <https://forum.ansible.com/t/did-something-changed-in-how-handlers-are-called/22523>\
**Category:** Ansible Developer\
**Created:** [September 9, 2016, 5:13pm UTC](https://forum.ansible.com/t/did-something-changed-in-how-handlers-are-called/22523 "2016-09-09T17:13:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Tanner](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Post date:** [September 9, 2016, 5:13pm UTC](https://forum.ansible.com/t/did-something-changed-in-how-handlers-are-called/22523/1 "2016-09-09T17:13:05Z")

</div>

Did something change with how handlers are invoked?

Today’s git pull of devel and all my handlers that need to run as root are failing.

$ ansible --version

ansible 2.2.0 (devel 19e00cf160) last updated 2016/09/09 11:04:47 (GMT -500)  
lib/ansible/modules/core: (detached HEAD bf5b3de83e) last updated 2016/09/09 11:04:47 (GMT -500)  
lib/ansible/modules/extras: (detached HEAD f83aa9fff3) last updated 2016/09/09 11:04:47 (GMT -500)  
config file = /Users/tanner/projects/ansible.git/playbooks.git/ansible.cfg  
configured module search path = Default w/o overrides

- hosts: all  
roles:
- { role: grub2, become: yes }

grub2 handlers/main.yml

- name: update grub2  
command: “{{ update\_grub2\_command }}”  
register: r  
failed\_when: r.rc != 0  
changed\_when: False  
tags: grub2

RUNNING HANDLER [grub2 : update grub2] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [testing\_xenial64]: FAILED! =\> {“changed”: false, “cmd”: [“/usr/sbin/update-grub2”], “delta”: “0:00:00.011241”, “end”: “2016-09-09 12:06:25.551493”, “failed”: true, “failed\_when\_result”: true, “rc”: 1, “start”: “2016-09-09 12:06:25.540252”, “stderr”: “grub-mkconfig: You must run this as root”, “stdout”: “”, “stdout\_lines”: , “warnings”: }

Changing the handler to

- name: update grub2  
command: “{{ update\_grub2\_command }}”  
register: r  
failed\_when: r.rc != 0  
changed\_when: False  
**become: yes**  
tags: grub2

Fixes the problem.

---

<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:** [September 9, 2016, 5:47pm UTC](https://forum.ansible.com/t/did-something-changed-in-how-handlers-are-called/22523/2 "2016-09-09T17:47:57Z")

</div>

Yes, potentially as part of the include\_role/dynamic role changes made in devel recently. Could you please open a bug in regards to this?
