--- - name: Write variables to /etc/default/lxc-net ansible.builtin.blockinfile: path: /etc/default/lxc-net block: "{{ lookup('ansible.builtin.template', 'etc/default/lxc-net.j2') }}" marker: "# {mark} ANSIBLE MANAGED BLOCK - custom network settings" insertafter: EOF backup: yes notify: Restart lxc-net