ansible-collection-famedly-.../roles/hostname
2023-02-21 21:21:50 +01:00
..
defaults chore(hostname): fix lints in role 2023-02-21 21:21:50 +01:00
tasks chore(hostname): fix lints in role 2023-02-21 21:21:50 +01:00
vars chore(hostname): fix lints in role 2023-02-21 21:21:50 +01:00
README.md chore: update READMEs 2021-09-07 08:59:51 +02:00

famedly.base.hostname ansible role for hostname management

This role manages all hostnames of the target server, both /etc/hostname and additional hostnames in /etc/hosts.

Usage

At the bare minimum, you need to specify hostname_fqdn, this is the primary hostname of the target, which ends up in /etc/hostname.

You can specify additional hostnames for /etc/hosts in hostname_extra_hosts in the form of {ip, fqdn, alias[] }, following conventions usual for /etc/hosts (single IP, FQDN first and aliases as plain hostnames).

Gotchas

This role uses the hostnamectl command installed by default on debian-like distros in order to ensure the new hostname is immediately set without needing to reboot.