Skip to content

Commit

Permalink
fix: fqdn should come before alias
Browse files Browse the repository at this point in the history
Otherwise `hostname -f` will give you localhost
  • Loading branch information
LukeRepko committed May 10, 2024
1 parent aee052e commit 892b3b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/k8s-kubespray.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 892b3b9

Please sign in to comment.