ansible.builtin.hostname (v2.8.18) — module

Manage hostname

| "added in version" 1.4 of ansible.builtin"

Authors: Adrian Likins (@alikins), Hideki Saito (@saito-hideki)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.8.18

Description

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.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- hostname:
    name: web01

Inputs

    
name:
    description:
    - Name of the host
    required: true