- name: Raspberry pi general setup hosts: raspberries:&local gather_facts: yes tags: never become: yes tasks: - name: set hostname ansible.builtin.hostname: name: "{{ inventory_hostname }}" become: yes when: inventory_hostname != ansible_hostname - name: Ensure dnsmasq user is in dip group for Pi-hole DNS ansible.builtin.user: name: dnsmasq groups: dip append: yes when: "'pihole' in group_names" - name: Disable dnsmasq service on Pi-hole nodes to avoid port 53 conflict with pihole-FTL ansible.builtin.systemd: name: dnsmasq state: stopped enabled: no when: "'pihole' in group_names"