Community.general.shutdown Interactive authentication required

… or run

- name: Poweroff by NUT
  ansible.builtin.command: sudo /usr/sbin/poweroff

Alternatively, sudo /usr/bin/systemctl poweroff.

However, that could fail to return as the command module process on the managed node may be killed before it returns status to the controller. Hmm.

1 Like