Set the Hostname
No special requirements
None.
ansible-galaxy role install git+https://github.com/un-smurf/ansible-role-hostname,main,un-smurf.hostname
Available variables are listed below, along with default values (see defaults/main.yml
):
hostname_hostname: "server1.example.com"
Set the hostname to a FQDN
- hosts: servers
vars_files:
vars/main.yml
roles:
- un-smurf.hostname
Inside vars/main.yml
:
hostname_hostname: "server1.example.com"
MIT
This role was created in 2024 by un-smurf.