diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-02-17 08:13:12 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-02-17 08:13:12 -0200 |
commit | 3c718bc6e844012fac2e37158b12487150127c21 (patch) | |
tree | 0647d934c5a85efaf46c27ee2e53623dae8161f7 | |
parent | 13f8acce7149ff0a0eea5f981070109fe5648e77 (diff) | |
download | hydra-3c718bc6e844012fac2e37158b12487150127c21.tar.gz hydra-3c718bc6e844012fac2e37158b12487150127c21.tar.bz2 |
Deploy: check if fqdn match
-rwxr-xr-x | share/hydra/deploy | 8 |
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 |