diff options
author | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-02-13 20:05:25 -0500 |
---|---|---|
committer | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-02-13 20:05:52 -0500 |
commit | 8c2dccad6652a535a6c549a2c4133afd9eb251ed (patch) | |
tree | 6760ba328fe606693601f9c1c51bfd7b010a974b /roles/hostname | |
parent | 3e94667b6b73c588ea8503138b5e201b45686978 (diff) | |
download | selfhosted-8c2dccad6652a535a6c549a2c4133afd9eb251ed.tar.gz selfhosted-8c2dccad6652a535a6c549a2c4133afd9eb251ed.zip |
add docs
Diffstat (limited to 'roles/hostname')
-rw-r--r-- | roles/hostname/README.md | 30 | ||||
-rw-r--r-- | roles/hostname/defaults/main.yml | 2 |
2 files changed, 31 insertions, 1 deletions
diff --git a/roles/hostname/README.md b/roles/hostname/README.md new file mode 100644 index 0000000..057bce0 --- /dev/null +++ b/roles/hostname/README.md @@ -0,0 +1,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 +```` diff --git a/roles/hostname/defaults/main.yml b/roles/hostname/defaults/main.yml index c884565..8fc7757 100644 --- a/roles/hostname/defaults/main.yml +++ b/roles/hostname/defaults/main.yml @@ -1,3 +1,3 @@ -hostname_fqdn: '{{ fqdn }}' +hostname_fqdn: '{{ inventory_hostname }}.{{ domain }}' hostname_short: '{{ inventory_hostname }}' hostname_ip: '{{ ip }}' |