From 85e58f49ca676a3cfb34c6bfb27bb5d0b39e83f4 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Mon, 7 Mar 2016 14:29:07 +0100 Subject: add fromPort function (cherry picked from commit c3a23f89092d1ef8367c37ab8993ea7031124f4b) --- src/Propellor/Property/Munin.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Propellor/Property/Munin.hs') 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] -- cgit v1.3-2-g0d8e