---
- name: restart consul
  action: service name=consul state=restarted enabled=yes
  when: consul_manage_service

- name: reload consul config
  become: yes
  command: pkill -1 consul
  when: consul_service_state is not "stopped" and consul_manage_service

- name: reload systemd
  become: yes
  command: systemctl daemon-reload

- name: restart dnsmasq
  service: name=dnsmasq state=restarted enabled=yes

---
- name: reload systemd
  become: yes
  command: systemctl daemon-reload

- name: restart consul
  action: service name=consul state=restarted enabled=yes
  when: consul_manage_service

- name: reload consul config
  become: yes
  command: pkill -1 consul
  when: consul_service_state is not "stopped" and consul_manage_service

- name: restart dnsmasq
  service: name=dnsmasq state=restarted enabled=yes

Reorder handlers so systemd config is reloaded before consul uses systemd to restart itself.
Reorder handlers so systemd config is reloaded before consul uses systemd to restart itself.
