Node/Hostname
Get or set the hostname of target hosts
Get the hostname of the host
Reads the host's name as the hostname command prints it, on Linux and on macOS. It makes no DNS lookup.
Set the hostname of the host
Sets the static hostname with hostnamectl set-hostname, which keeps it after a reboot. A host that already has the name does not change and reports changed: false. It runs on the Debian family only, and elsewhere reports skipped. In a container the runtime owns the hostname, so there it also reports skipped.