diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-01-01 13:31:30 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-01-01 13:31:30 -0400 |
| commit | 72b7b0652577b5c454687ed576606023ba8f7386 (patch) | |
| tree | 2e7707725c773182d840aad67d262ea8d8201b17 /src | |
| parent | b9c1bd87a3b3857ec092ef9e90622e916adb93d0 (diff) | |
propellor spin
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Spin.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs index a9a61c16..67fa7c58 100644 --- a/src/Propellor/Spin.hs +++ b/src/Propellor/Spin.hs @@ -105,7 +105,11 @@ getSshTarget target hst matchingtarget a = (==) target <$> inet_ntoa a - useip = return $ fromMaybe target configip + useip = case configip of + Nothing -> return target + Just ip -> do + warningMessage $ "DNS seems out of date for " ++ target ++ "; using IP address from configuration instead." + return ip configip = case mapMaybe getIPAddr (S.toList (_dns (hostInfo hst))) of [] -> Nothing |
