hostname: Playbook to set system hostname
The `hostname.yml` playbook does what it says on the tin: it sets the hostname of the managed node. The `preferred_hostname` variable can be used to specify the value to use for the hostname. If it is not set, the name specified in the inventory is used.jenkins-master
parent
7f86881b7c
commit
e327db1f4f
|
@ -0,0 +1,5 @@
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: ensure hostname is set
|
||||||
|
hostname:
|
||||||
|
name={{ preferred_hostname|d(inventory_hostname) }}
|
Loading…
Reference in New Issue