fix: use FQDN instead of HOST

pull/853/head
Bernhard Czypka 2025-03-22 21:06:05 +01:00 committed by GitHub
parent 5a325c23d7
commit 6702b8ed49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ Set the hostname on each machine listed in the `machines.txt` file:
while read IP FQDN HOST SUBNET; do
CMD="sed -i 's/^127.0.1.1.*/127.0.1.1\t${FQDN} ${HOST}/' /etc/hosts"
ssh -n root@${IP} "$CMD"
ssh -n root@${IP} hostnamectl hostname ${HOST}
ssh -n root@${IP} hostnamectl hostname ${FQDN}
done < machines.txt
```