- name: Set up voidlinux networking hosts: target_system become: true vars: nameserver1: 9.9.9.9 nameserver2: 9.9.9.10 tasks: - name: Configure resolv DNS ansible.builtin.copy: mode: 0644 dest: "/etc/resolv.conf" content: | nameserver {{ nameserver1 }} nameserver {{ nameserver2 }} failed_when: false # can't ever fail - name: Activate dhcp service ansible.builtin.file: force: 'yes' src: "/etc/sv/{{ item }}" dest: "/etc/runit/runsvdir/default/{{ item }}" state: link with_items: [ dhcpcd ]