#!/usr/bin/env bash set -eux ### --start_docs ## Adjust the hostname as necessary (usually on the undercloud) ## Note.. run this script with sudo or root ## ============================================================ ## * Correct the host's transient hostname to a static one ## :: hostnamectl set-hostname --transient $(hostnamectl --static) ## * Sanitize the /etc/hosts for duplicate entries ## :: cp /etc/hosts /etc/hosts.bak awk '!seen[$0]++' /etc/hosts > /etc/hosts.new mv -f /etc/hosts.new /etc/hosts ### --stop_docs