--- - name: Ensure that BIND is not installed in order to avoid conflicts with dnsmasq apt: name: bind9 state: absent - name: Install dnsmasq apt: name: dnsmasq state: present - name: Generate the dnsmasq configuration file template: src: dnsmasq.conf.j2 dest: /etc/dnsmasq.conf notify: Restart dnsmasq # vim: set ft=yaml sw=2: