--- - name: generate configuration files ansible.builtin.copy: content: "nameserver {{ item.ip }}\n" dest: "{{ item.file }}" mode: "0644" owner: 0 group: 0 loop: "{{ resolv_dns_servers }}"