From e77c7887dd093e9a1c3d06145f74146f92dc6105 Mon Sep 17 00:00:00 2001 From: Luke Repko Date: Fri, 10 May 2024 18:12:06 -0500 Subject: [PATCH] fix: fqdn should come before alias (#260) Otherwise `hostname -f` will give you localhost --- docs/k8s-kubespray.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/k8s-kubespray.md b/docs/k8s-kubespray.md index cf0b080c..76dddbc0 100644 --- a/docs/k8s-kubespray.md +++ b/docs/k8s-kubespray.md @@ -57,7 +57,7 @@ Before running the Kubernetes deployment, make sure that all hosts have a proper ``` shell source /opt/genestack/scripts/genestack.rc ansible -m shell -a 'hostnamectl set-hostname {{ inventory_hostname }}' --become all -ansible -m shell -a "grep 127.0.0.1 /etc/hosts | grep -q {{ inventory_hostname }} || sed -i '/^127.0.0.1/ s/$/ {{ inventory_hostname }}/' /etc/hosts" --become all +ansible -m shell -a "grep 127.0.0.1 /etc/hosts | grep -q {{ inventory_hostname }} || sed -i 's/^127.0.0.1.*/127.0.0.1 {{ inventory_hostname }} localhost.localdomain localhost/' /etc/hosts" --become all ``` !!! note