ansible / ansible.builtin / v2.7.9 / module / hostname Manage hostname | "added in version" 1.4 of ansible.builtin" Authors: Adrian Likins (@alikins), Hideki Saito (@saito-hideki) preview | supported by communityansible.builtin.hostname (v2.7.9) — module
pip
Install with pip install ansible==2.7.9
Set system's hostname, supports most OSs/Distributions, including those using systemd.
Note, this module does *NOT* modify C(/etc/hosts). You need to modify it yourself using other modules like template or replace.
Windows, HP-UX and AIX are not currently supported.
- hostname: name: web01
name: description: - Name of the host required: true