diff --git a/roles/pi_disable_onboard_bluetooth/handlers/main.yml b/roles/pi_disable_onboard_bluetooth/handlers/main.yml index a8f18bd..b9b0c7a 100644 --- a/roles/pi_disable_onboard_bluetooth/handlers/main.yml +++ b/roles/pi_disable_onboard_bluetooth/handlers/main.yml @@ -1,3 +1,7 @@ --- -- name: Reboot +# Handler names are play-global: if several roles define the same name, only the +# last one defined runs, under *that* role's `when:`. A shared "Reboot" therefore +# never fired while pi_disable_onboard_bluetooth (usually switched off) defined one +# too. Keep this name unique to the role. +- name: Reboot after disabling onboard Bluetooth ansible.builtin.reboot: diff --git a/roles/pi_disable_onboard_bluetooth/tasks/main.yml b/roles/pi_disable_onboard_bluetooth/tasks/main.yml index cc7d963..0871ea1 100644 --- a/roles/pi_disable_onboard_bluetooth/tasks/main.yml +++ b/roles/pi_disable_onboard_bluetooth/tasks/main.yml @@ -4,4 +4,4 @@ path: /boot/firmware/config.txt regexp: "^#?dtoverlay=disable-bt" line: "dtoverlay=disable-bt" - notify: Reboot + notify: Reboot after disabling onboard Bluetooth diff --git a/roles/pi_hifiberry_amp/handlers/main.yml b/roles/pi_hifiberry_amp/handlers/main.yml index a8f18bd..456b929 100644 --- a/roles/pi_hifiberry_amp/handlers/main.yml +++ b/roles/pi_hifiberry_amp/handlers/main.yml @@ -1,3 +1,7 @@ --- -- name: Reboot +# Handler names are play-global: if several roles define the same name, only the +# last one defined runs, under *that* role's `when:`. A shared "Reboot" therefore +# never fired while pi_disable_onboard_bluetooth (usually switched off) defined one +# too. Keep this name unique to the role. +- name: Reboot after HiFiBerry boot config change ansible.builtin.reboot: diff --git a/roles/pi_hifiberry_amp/tasks/main.yml b/roles/pi_hifiberry_amp/tasks/main.yml index 59f0e17..2e364ee 100644 --- a/roles/pi_hifiberry_amp/tasks/main.yml +++ b/roles/pi_hifiberry_amp/tasks/main.yml @@ -4,13 +4,13 @@ path: /boot/config.txt regexp: "^#?dtparam=audio=on" line: "#dtparam=audio=on" - notify: Reboot + notify: Reboot after HiFiBerry boot config change - name: Activate Hifiberry ansible.builtin.lineinfile: path: /boot/firmware/config.txt regexp: "^#?dtoverlay=hifiberry-amp" line: "dtoverlay={{ hifiberry_overlay }}" - notify: Reboot + notify: Reboot after HiFiBerry boot config change - name: Lift the Pi 5's USB current cap when the HiFiBerry board powers it # A Pi 5 fed over the GPIO header has no USB-C power negotiation, so it assumes a # weak supply and limits USB ports to 600mA. Unknown to a Pi 4, which ignores it. @@ -20,4 +20,4 @@ line: "usb_max_current_enable=1" insertafter: EOF when: hifiberry_powers_pi - notify: Reboot + notify: Reboot after HiFiBerry boot config change diff --git a/roles/pi_standard_setup/handlers/main.yml b/roles/pi_standard_setup/handlers/main.yml index 8ef7e11..5ff8d7b 100644 --- a/roles/pi_standard_setup/handlers/main.yml +++ b/roles/pi_standard_setup/handlers/main.yml @@ -3,7 +3,11 @@ ansible.builtin.service: name: sshd state: restarted -- name: Reboot +# Handler names are play-global: if several roles define the same name, only the +# last one defined runs, under *that* role's `when:`. A shared "Reboot" therefore +# never fired while pi_disable_onboard_bluetooth (usually switched off) defined one +# too. Keep this name unique to the role. +- name: Reboot after standard setup ansible.builtin.reboot: - name: Restart raspi-leds-off ansible.builtin.service: diff --git a/roles/pi_standard_setup/tasks/main.yml b/roles/pi_standard_setup/tasks/main.yml index 51e005c..a83e1b5 100644 --- a/roles/pi_standard_setup/tasks/main.yml +++ b/roles/pi_standard_setup/tasks/main.yml @@ -61,7 +61,7 @@ when: pi_standard_setup_new_hostname | length > 0 and pi_standard_setup_pi_hostname.stdout != pi_standard_setup_new_hostname register: pi_standard_setup_set_hostname changed_when: true - notify: Reboot + notify: Reboot after standard setup - name: Get hostname ansible.builtin.command: "raspi-config nonint get_hostname" register: pi_standard_setup_pi_hostname @@ -121,7 +121,7 @@ cache_valid_time: 7200 state: present when: pi_standard_setup_install_pi5_kernel - notify: Reboot + notify: Reboot after standard setup - name: Copy vim config ansible.builtin.copy: src: vimrc