aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/deploy7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/deploy b/bin/deploy
index 3680129..518e03a 100755
--- a/bin/deploy
+++ b/bin/deploy
@@ -66,6 +66,13 @@ if [ -e "$BASEDIR/Puppetfile" ]; then
fi
fi
+# Setup facts
+ROLE="`hydractl yaml-param nodo::role $BASEDIR/config/node/$FQDN.yaml default`"
+LOCATION="`hydractl yaml-param nodo::location $BASEDIR/config/node/$FQDN.yaml default`"
+$SUDO mkdir -p /etc/facter/facts.d
+$SUDO echo "role=$ROLE" | $SUDO tee /etc/facter/facts.d/role.txt > /dev/null
+$SUDO echo "location=$LOCATION" | $SUDO tee /etc/facter/facts.d/location.txt > /dev/null
+
# Run puppet apply
PUPPET_OPTS="--confdir=$BASEDIR --modulepath=$BASEDIR/modules"
LC_ALL=C $SUDO puppet apply $PUPPET_OPTS $PUPPET_MANIFEST