--- # Rather than restarting the systemd job, use pihole's builtin reconfig script. # When you run "pihole -r", a TUI window "Existing Install Detected!" lets you # select either # + Repair: This will retain existing settings # + Reconfigure: Resets Pi-hole and allows re-selecting settings # https://old.reddit.com/r/pihole/comments/m7nx5w/run_pihole_r_unattended # It looks to me like "--reconfigure --unattended" and "--repair --unattended" both # perform the same tasks. - name: Reconfigure Pi-Hole subsystems become: true ansible.builtin.command: "{{ pihole_install_script }} --reconfigure --unattended" listen: reconfigure pihole changed_when: true