--- - name: replace pi.hole hostname become: true ansible.builtin.replace: path: "{{ item }}" regexp: "pi\\.hole" replace: "pi.bdebyl.net" loop: - /srv/http/pihole/admin/scripts/pi-hole/php/auth.php - /srv/http/pihole/pihole/index.php tags: - pihole