puppet-infracloud/examples/elements/infracloud-static-net/post-install.d/05-set-hostname

15 lines
264 B
Bash
Executable File

#!/bin/bash
set -ux
if [ "$DIB_ROLE" == "controller" ] ; then
HOSTNAME="controller00"
elif [ "$DIB_ROLE" == "compute" ] ; then
HOSTNAME="compute000"
else
echo "DIB_ROLE must be either 'controller' or 'compute'."
exit 1
fi
echo $HOSTNAME > /etc/hostname