summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Munin.hs
diff options
context:
space:
mode:
authorFĂ©lix Sipma2016-03-07 14:29:07 +0100
committerJoey Hess2016-03-07 16:31:52 -0400
commit85e58f49ca676a3cfb34c6bfb27bb5d0b39e83f4 (patch)
tree4c679447a9ba78feb48cde256cd646941279c15c /src/Propellor/Property/Munin.hs
parent9003983998e50f11e85e7f29e3eae3c486c0f6d0 (diff)
add fromPort function
(cherry picked from commit c3a23f89092d1ef8367c37ab8993ea7031124f4b)
Diffstat (limited to 'src/Propellor/Property/Munin.hs')
-rw-r--r--src/Propellor/Property/Munin.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Propellor/Property/Munin.hs b/src/Propellor/Property/Munin.hs
index 43112a6c..2464985a 100644
--- a/src/Propellor/Property/Munin.hs
+++ b/src/Propellor/Property/Munin.hs
@@ -47,10 +47,9 @@ hostListFragment' hs os = concatMap muninHost hs
muninHost :: Host -> [String]
muninHost h = [ "[" ++ (hostName h) ++ "]"
, " address " ++ maybe (hostName h) (fromIPAddr . fst) (hOverride h)
- ] ++ (maybe [] (\x -> [" port " ++ (show $ fromPort $ snd x)]) (hOverride h)) ++ [""]
+ ] ++ (maybe [] (\x -> [" port " ++ (fromPort $ snd x)]) (hOverride h)) ++ [""]
hOverride :: Host -> Maybe (IPAddr, Port)
hOverride h = lookup (hostName h) os
- fromPort (Port p) = p
-- | Create the host list fragment for master config.
hostListFragment :: [Host] -> [String]