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

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

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