---
- name: daemon reload
  systemd:
    daemon_reload: true

- name: restart dnscrypt-proxy
  systemd:
    name: dnscrypt-proxy
    state: restarted
    daemon_reload: true
  when: ansible_distribution == 'Ubuntu'

- name: restart dnscrypt-proxy
  service:
    name: dnscrypt-proxy
    state: restarted
  when: ansible_distribution == 'FreeBSD'
