---
# handlers file for consul

- name: restart consul
  service:
    name: "{{ consul_service_name }}"
    state: restarted
    enabled: yes
  when: consul_service_manage
  tags: consul

- name: reload consul
  service:
    name: "{{ consul_service_name }}"
    state: reloaded
  tags: consul

- name: restart dnsmasq
  service:
    name: dnsmasq
    state: restarted

---
# handlers file for consul

- name: restart consul
  service:
    name: "{{ consul_service_name }}"
    state: restarted
    enabled: yes
  when:
    - consul_service_manage
    - not ansible_check_mode
  tags: consul

- name: reload consul
  service:
    name: "{{ consul_service_name }}"
    state: reloaded
  tags: consul

- name: restart dnsmasq
  service:
    name: dnsmasq
    state: restarted

Fix check mode for restart consul handler
Fix check mode for restart consul handler
