--- - name: Copy conf ansible.builtin.template: src: "{{ item.src }}" dest: "{{ item.dest }}" group: root mode: u=rwx,g=x,o=x loop: - { src: 'firewall.j2', dest: '/etc/init.d/firewall' } register: iptables_templates_results become: yes - name: Ensure Service firewall is Enabled become: yes ansible.builtin.service: name: firewall enabled: yes