summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-02-17 08:13:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-02-17 08:13:12 -0200
commit3c718bc6e844012fac2e37158b12487150127c21 (patch)
tree0647d934c5a85efaf46c27ee2e53623dae8161f7
parent13f8acce7149ff0a0eea5f981070109fe5648e77 (diff)
downloadhydra-3c718bc6e844012fac2e37158b12487150127c21.tar.gz
hydra-3c718bc6e844012fac2e37158b12487150127c21.tar.bz2
Deploy: check if fqdn match
-rwxr-xr-xshare/hydra/deploy8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index d9d14a2..d8fd3f8 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -113,7 +113,7 @@ for node in $NODES; do
# Setup deploy environment
hydra_deploy_setup remote $node || continue
- # Check if puppet is installed
+ # Check remote environment
$HYDRA_CONNECT $FQDN <<EOF
##### BEGIN REMOTE SCRIPT #####
if ! sudo -n true; then
@@ -121,6 +121,12 @@ for node in $NODES; do
exit 1
fi
+ if [ "\$(facter fqdn)" != "$FQDN" ]; then
+ echo "FQDN does not match:"
+ echo "Remote presents itself as \$(facter fqdn) instead of $FQDN"
+ exit 1
+ fi
+
if ! which puppet &> /dev/null; then
echo "Installing dependencies..."
sudo apt-get update