# \--check (dry run) fires notify handlers

**URL:** <https://forum.ansible.com/t/check-dry-run-fires-notify-handlers/21947>\
**Category:** Ansible Project\
**Created:** [July 7, 2016, 8:45am UTC](https://forum.ansible.com/t/check-dry-run-fires-notify-handlers/21947 "2016-07-07T08:45:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ja.garcia.ballester](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@ja.garcia.ballester](https://forum.ansible.com/u/ja.garcia.ballester)\
**Post date:** [July 7, 2016, 8:45am UTC](https://forum.ansible.com/t/check-dry-run-fires-notify-handlers/21947/1 "2016-07-07T08:45:20Z")

</div>

Hi,

I am runnig a playbook in check mode (–check --diff) to verify which changes are going to be applied in a service config file.  
The problem is that the dry run thinks the change is applied and fires the notify handler, restarting the service with no change applied

On a production enviroment that can be catastrofical

¿ is there any way to avoid the handler on dry run mode ?

Example code:

task/main.yml  
…

- name: configure elasticsearch  
template: src={{ item[1:] }}.j2 dest={{ item }}  
owner=root group=root mode=0644  
with\_items:
- ‘/etc/default/elasticsearch’
- ‘{{ elasticsearch\_path\_conf }}/elasticsearch.yml’
- ‘{{ elasticsearch\_path\_conf }}/logging.yml’  
notify:
- restart elasticsearch  
tags:
- configure

…

handlers/main.yml  
…

- name: restart elasticsearch  
service: \>  
name=elasticsearch  
state=restarted  
enabled=yes

…

Thanks in advance.
