- block:

  - name: Configure avahi mdns
    template:
      src: avahi-daemon.conf
      dest: /etc/avahi/avahi-daemon.conf
      backup: yes
    notify:
      - Restart services
      - Check services running

  - name: Configure dnsmasq
    template:
      src: dnsmasq.conf
      dest: /etc/dnsmasq.conf
      backup: yes
    notify:
      - Restart services
      - Check services running

  - name: Don't use dnsmasq for imaging machine's own DNS resolving
    lineinfile:
      path: /etc/default/dnsmasq
      state: present
      line: DNSMASQ_EXCEPT=lo
      backup: yes
    notify:
      - Restart services
      - Check services running

  - name: Configure nfs
    template:
      src: exports
      dest: /etc/exports
      backup: yes
    notify:
      - Restart services
      - Check services running

  - name: Configure nginx
    template:
      src: nginx_default
      dest: /etc/nginx/sites-available/default
      backup: yes
    notify:
      - Restart services
      - Check services running

  become: yes
