You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation .
hostname - Manage hostname
Set system’s hostname, supports most OSs/Distributions, including those using systemd.
Note, this module does NOT modify /etc/hosts
. You need to modify it yourself using other modules like template or replace.
Windows, HP-UX and AIX are not currently supported.
parameter
required
default
choices
comments
name
yes
Name of the host
Copyright © 2017 Red Hat, Inc.
Last updated on Nov 15, 2022.
Ansible docs are generated from GitHub sources using Sphinx using a theme provided by Read the Docs . . Module documentation is not edited directly, but is generated from the source code for the modules. To submit an update to module docs, edit the 'DOCUMENTATION' metadata in the modules directory of the core source code repository .