summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2015-01-01 16:19:32 -0400
committerJoey Hess2015-01-01 16:19:32 -0400
commit31739ac1a60b461519702b24e14df98cf173941b (patch)
treed1b82c5fbce82ceb00db45e69b462d47e8007b04 /src
parentf89aeaa0e8858109d44fdaa5911f5fecacf7ce6b (diff)
propellor spin
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Spin.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs
index a6744bf4..14275957 100644
--- a/src/Propellor/Spin.hs
+++ b/src/Propellor/Spin.hs
@@ -96,14 +96,12 @@ spin target relay hst = do
-- the host in it at all, use one of the Host's IPs instead.
getSshTarget :: HostName -> Host -> IO String
getSshTarget target hst
- | null configips = go =<< tryIO (BSD.getHostByName target)
- | otherwise = return target
+ | null configips = return target
+ | otherwise = go =<< tryIO (BSD.getHostByName target)
where
go (Left e) = useip (show e)
go (Right hostentry) = ifM (anyM matchingconfig (BSD.hostAddresses hostentry))
- ( do
- print "MATCHING IP"
- return target
+ ( return target
, do
ips <- mapM inet_ntoa (BSD.hostAddresses hostentry)
useip ("DNS " ++ show ips ++ " vs configured " ++ show configips)