From d35c209c0a564f48cc28d258a33443625b2e9f27 Mon Sep 17 00:00:00 2001 From: Gerson Sosa <4366859+gersonsosa@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:56:22 +0200 Subject: [PATCH] docs: Fix a bug while setting the hostname for all machines --- docs/03-compute-resources.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/03-compute-resources.md b/docs/03-compute-resources.md index 207805a..40e6092 100644 --- a/docs/03-compute-resources.md +++ b/docs/03-compute-resources.md @@ -104,8 +104,8 @@ To configure the hostname for each machine, run the following commands on the `j Set the hostname on each machine listed in the `machines.txt` file: ```bash -while read IP FQDN HOST SUBNET; do - CMD="sed -i 's/^127.0.1.1.*/127.0.1.1\t${FQDN} ${HOST}/' /etc/hosts" +while read IP FQDN HOST SUBNET; do + CMD="sed -i 's/^127.0.0.1.*/127.0.0.1\t${FQDN} ${HOST}/' /etc/hosts" ssh -n root@${IP} "$CMD" ssh -n root@${IP} hostnamectl hostname ${HOST} done < machines.txt