--- - name: Reboot server become: true ansible.builtin.reboot: reboot_command: "{{ custom_reboot_command | default(omit) }}" listen: reboot server