--- - hosts: gateway become: True gather_facts: False tasks: - name: Restart ProtonVPN systemd: name: 'openvpn-client@proton' state: restarted - name: Wait for VPN to reconnect wait_for: path: /proc/sys/net/ipv4/conf/tun0 - name: Get new IP of VPN setup: - name: Update unbound.conf template: src: "{{ playbook_dir }}/../roles/name-resolution/templates/unbound/unbound.conf.j2" dest: /etc/unbound/unbound.conf owner: root group: unbound mode: '0644' - name: Restart unbound systemd: name: unbound state: restarted