ansible.builtin.hostname – Manage hostname
This module is part of
ansible-core and included in all Ansible
installations. In most cases, you can use the short module name
hostname even without specifying the
However, we recommend you use the FQCN for easy linking to the module
documentation and to avoid conflicting with other collections that may have
the same module name.
New in version 1.4: of ansible.builtin
Set system’s hostname. Supports most OSs/Distributions including those using
Windows, HP-UX, and AIX are not currently supported.
On macOS, this module uses
LocalHostNamecannot contain spaces or most special characters, this module will replace characters when setting