25 lines
610 B
Django/Jinja
25 lines
610 B
Django/Jinja
#!/usr/bin/env bash
|
|
set -eux
|
|
|
|
### --start_docs
|
|
## Adjust the hostname as necessary (usually on the undercloud)
|
|
## ============================================================
|
|
|
|
|
|
{% if hostname_correction|bool %}
|
|
## * Correct the host's transient hostname to a static one
|
|
## ::
|
|
|
|
sudo hostnamectl set-hostname --transient $(hostnamectl --static)
|
|
|
|
{% elif step_set_undercloud_hostname|bool %}
|
|
## * Set the host's transient and static hostnames
|
|
## ::
|
|
|
|
sudo hostnamectl set-hostname --transient {{ undercloud_hostname }}
|
|
sudo hostnamectl set-hostname --static {{ undercloud_hostname }}
|
|
|
|
{% endif %}
|
|
|
|
### --stop_docs
|