From: David Galloway Date: Tue, 20 Feb 2018 19:42:51 +0000 (-0500) Subject: cobbler: echo short hostname into /etc/hostname during rc.local X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=55660bdeb60575b7c6f99e760eb74e955e0066f4;p=ceph-cm-ansible.git cobbler: echo short hostname into /etc/hostname during rc.local Fixes: https://tracker.ceph.com/issues/23052 Ceph should be able to handle the FQDN but whatever. Signed-off-by: David Galloway --- diff --git a/roles/cobbler/templates/snippets/cephlab_rc_local b/roles/cobbler/templates/snippets/cephlab_rc_local index e9d0c8df..5dcee1b9 100644 --- a/roles/cobbler/templates/snippets/cephlab_rc_local +++ b/roles/cobbler/templates/snippets/cephlab_rc_local @@ -80,7 +80,7 @@ if [ -n "$myips" ]; then hostname $newhostname newdomain=$(hostname -d) shorthostname=$(hostname -s) - echo $newhostname > /etc/hostname + echo $shorthostname > /etc/hostname if grep -q $newdomain /etc/hosts; then # Replace sed -i "s/.*$newdomain.*/$ip $newhostname $shorthostname/g" /etc/hosts