blob: 057bce0b13ad403d31533ded773bd3334f74298f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
Hostname
========
Description
-----------
The `hostname` role sets the local hostname and generates `/etc/hosts`.
Variables
---------
This role **accepts** the following variables:
Variable | Default | Description
-----------------|-----------------------------------------|------------
`hostname_fqdn` | `{{ inventory_hostname }}.{{ domain }}` | Fully qualified domain name
`hostname_short` | `{{ inventory_hostname }}` | Short hostname
`hostname_ip` | `{{ ip }}` | IPv4 address
Usage
-----
Example playbook:
````yaml
- name: set hostname
hosts: all
roles:
- hostname
````
|