Ansible treats rc 255 as an SSH protocol error, so a raw task can succeed and still end the play as UNREACHABLE. The workaround: wrap your command in a shell one-liner or script that translates exit code 255 into something else, e.g. `mycommand; rc=$?; [ $rc -eq 255 ] && exit 1 || exit $rc`. Or switch those tasks to paramiko instead of ssh with `ansible_connection: paramiko` on the host. Either way, stop 255 from leaking through SSH and the false UNREACHABLE goes away.
_Source: gh:ansible/ansible#80335 (Ansible)_