---

- name: Create mandatory directory
  file:
    path: "{{ systemd_resolve_config_dir }}"
    state: directory

- name: override dns systemd config
  template:
    src: consul/systemd-resolved.conf
    dest: "{{ systemd_resolve_config_dir }}/consul.conf"
  notify: Restart systemd_resolved
