]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
Fix: deploy: get FQDN from /etc/hostname
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 25 May 2020 16:03:22 +0000 (13:03 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 25 May 2020 16:03:22 +0000 (13:03 -0300)
bin/deploy

index 518e03a50f00cb01a3db42bdbe3bba02a4cf6c71..f23bc421e64b221e854dbb612953ff636d146397 100755 (executable)
@@ -7,12 +7,17 @@
 DIRNAME="`dirname $0`"
 BASEDIR="$DIRNAME/.."
 
+# Install dependencies
+source $DIRNAME/dependencies
+
 # Determine hostname
-if [ ! -z "$1" ]; then
-  FQDN="$1"
-else
-  FQDN="`cat /etc/hostname`"
-fi
+#if [ ! -z "$1" ]; then
+#  FQDN="$1"
+#else
+#  FQDN="`cat /etc/hostname`"
+#fi
+#FQDN="`facter fqdn`"
+FQDN="`cat /etc/hostname`"
 
 # Set manifest
 PUPPET_MANIFEST="$BASEDIR/manifests/nodes/$FQDN.pp"
@@ -26,9 +31,6 @@ if [ ! -e "$PUPPET_MANIFEST" ]; then
   exit 1
 fi
 
-# Install dependencies
-source $DIRNAME/dependencies
-
 # Ensure additional dependencies are installed.
 for package in $DEPLOY_DEPENDENCIES; do
   provision_package $package