--- - name: disable and stop dnsmasq ansible.builtin.systemd: name: "dnsmasq.service" enabled: False state: "stopped" masked: true notify: systemctl daemon-reload - name: deploy dnsmasq ansible.builtin.template: src: etc/systemd/system/dnsmasq.j2 dest: "/etc/systemd/system/dnsmasq@.service" notify: systemctl daemon-reload - name: deploy dnsmasq in netns ansible.builtin.template: src: usr/local/bin/run-dnsmasq-in-netns.sh.j2 dest: "/usr/local/bin/run-dnsmasq-in-netns.sh"