]> gitweb.fluxo.info Git - hydra.git/commitdiff
Deploy: check if fqdn match
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 17 Feb 2017 10:13:12 +0000 (08:13 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 17 Feb 2017 10:13:12 +0000 (08:13 -0200)
share/hydra/deploy

index d9d14a28ee2ac26cd2dca9ab0a971f339d9eec99..d8fd3f8053f2dd6c8532ecf6846615b44533075c 100755 (executable)
@@ -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