summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-05 15:32:33 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-05 15:32:33 -0400
commitf3eee548ea4f16e22b41c47f9d4f2afd84d4b7d4 (patch)
treee980512f1097d7f6b86343bd9e13eb67a90f2d8d
parent20bcc4b2815bffff65d8a776f990572066ea7f94 (diff)
Revert "Add Munin module."
This reverts commit 85379a479663a9ef15a66a99700eb38469b5e14a. Wow, applied to wrong project entirely.
-rw-r--r--src/Propellor/Property/Munin.hs57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/Propellor/Property/Munin.hs b/src/Propellor/Property/Munin.hs
deleted file mode 100644
index 43112a6c6..000000000
--- a/src/Propellor/Property/Munin.hs
+++ /dev/null
@@ -1,57 +0,0 @@
--- | Maintainer: Jelmer Vernooij <jelmer@jelmer.uk>
---
-module Propellor.Property.Munin (
- hostListFragment,
- hostListFragment',
- nodePort,
- nodeInstalled,
- nodeRestarted,
- nodeConfPath,
- masterInstalled,
- masterRestarted,
- masterConfPath,
-) where
-
-import Propellor
-import qualified Propellor.Property.Apt as Apt
-import qualified Propellor.Property.Service as Service
-
-nodePort :: Integer
-nodePort = 4949
-
-nodeInstalled :: Property NoInfo
-nodeInstalled = Apt.serviceInstalledRunning "munin-node"
-
-nodeRestarted :: Property NoInfo
-nodeRestarted = Service.restarted "munin-node"
-
-nodeConfPath :: FilePath
-nodeConfPath = "/etc/munin/munin-node.conf"
-
-masterInstalled :: Property NoInfo
-masterInstalled = Apt.serviceInstalledRunning "munin"
-
-masterRestarted :: Property NoInfo
-masterRestarted = Service.restarted "munin"
-
-masterConfPath :: FilePath
-masterConfPath = "/etc/munin/munin.conf"
-
-
--- | Create the host list fragment for master config.
--- Takes an optional override list for hosts that are accessible on a non-standard host/port.
--- TODO(jelmer): Only do this on hosts where munin is present (in other words, with Munin.installedNode)
-hostListFragment' :: [Host] -> [(HostName, (IPAddr, Port))] -> [String]
-hostListFragment' hs os = concatMap muninHost hs
- where
- muninHost :: Host -> [String]
- muninHost h = [ "[" ++ (hostName h) ++ "]"
- , " address " ++ maybe (hostName h) (fromIPAddr . fst) (hOverride h)
- ] ++ (maybe [] (\x -> [" port " ++ (show $ 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]
-hostListFragment hs = hostListFragment' hs []