summaryrefslogtreecommitdiff
path: root/src/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2015-12-05 18:03:02 -0400
committerJoey Hess2015-12-05 18:51:05 -0400
commit5cfb20668421acb3c0de133afe973fc693b8b320 (patch)
treedb49686bb48d1de1403aee9aa5ea8cb7d03c6a13 /src/Propellor/Property
parent12548bae3d8feecce6a322162d91b827289ae824 (diff)
remove trivial
Diffstat (limited to 'src/Propellor/Property')
-rw-r--r--src/Propellor/Property/Apt.hs8
-rw-r--r--src/Propellor/Property/Nginx.hs2
-rw-r--r--src/Propellor/Property/Postfix.hs3
-rw-r--r--src/Propellor/Property/Prosody.hs2
-rw-r--r--src/Propellor/Property/Uwsgi.hs2
5 files changed, 9 insertions, 8 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index cf81c9be..26c151d9 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -140,13 +140,13 @@ installed' params ps = robustly $ check (isInstallable ps) go
`assume` MadeChange
installedBackport :: [Package] -> Property NoInfo
-installedBackport ps = trivial $ withOS desc $ \o -> case o of
+installedBackport ps = withOS desc $ \o -> case o of
Nothing -> error "cannot install backports; os not declared"
(Just (System (Debian suite) _)) -> case backportSuite suite of
Nothing -> notsupported o
- Just bs -> ensureProperty $ runApt
- (["install", "-t", bs, "-y"] ++ ps)
- `assume` MadeChange
+ Just bs -> ensureProperty $
+ runApt (["install", "-t", bs, "-y"] ++ ps)
+ `changesFile` dpkgStatus
_ -> notsupported o
where
desc = (unwords $ "apt installed backport":ps)
diff --git a/src/Propellor/Property/Nginx.hs b/src/Propellor/Property/Nginx.hs
index c28dcc01..8fb5c49b 100644
--- a/src/Propellor/Property/Nginx.hs
+++ b/src/Propellor/Property/Nginx.hs
@@ -17,7 +17,7 @@ siteEnabled hn cf = enable <!> disable
`requires` siteAvailable hn cf
`requires` installed
`onChange` reloaded
- disable = trivial $ File.notPresent (siteVal hn)
+ disable = File.notPresent (siteVal hn)
`describe` ("nginx site disable" ++ hn)
`requires` installed
`onChange` reloaded
diff --git a/src/Propellor/Property/Postfix.hs b/src/Propellor/Property/Postfix.hs
index 782e7f45..bc46ac21 100644
--- a/src/Propellor/Property/Postfix.hs
+++ b/src/Propellor/Property/Postfix.hs
@@ -32,7 +32,7 @@ satellite :: Property NoInfo
satellite = check (not <$> mainCfIsSet "relayhost") setup
`requires` installed
where
- setup = trivial $ property "postfix satellite system" $ do
+ setup = property "postfix satellite system" $ do
hn <- asks hostName
let (_, domain) = separate (== '.') hn
ensureProperties
@@ -181,3 +181,4 @@ saslPasswdSet domain (User user) = withPrivData src ctx $ \getpw -> trivial $
p = proc "saslpasswd2" ps
ctx = Context "sasl"
src = PrivDataSource (Password uatd) "enter password"
+ trivial = flip assume NoChange
diff --git a/src/Propellor/Property/Prosody.hs b/src/Propellor/Property/Prosody.hs
index f2d80ae4..47095504 100644
--- a/src/Propellor/Property/Prosody.hs
+++ b/src/Propellor/Property/Prosody.hs
@@ -24,7 +24,7 @@ confEnabled conf cf = enable <!> disable
dir = confValPath conf
confValRelativePath conf' = File.LinkTarget $
"../conf.avail" </> conf' <.> "cfg.lua"
- disable = trivial $ File.notPresent (confValPath conf)
+ disable = File.notPresent (confValPath conf)
`describe` ("prosody conf disabled " ++ conf)
`requires` installed
`onChange` reloaded
diff --git a/src/Propellor/Property/Uwsgi.hs b/src/Propellor/Property/Uwsgi.hs
index 9748f16d..8b531c3f 100644
--- a/src/Propellor/Property/Uwsgi.hs
+++ b/src/Propellor/Property/Uwsgi.hs
@@ -19,7 +19,7 @@ appEnabled an cf = enable <!> disable
`requires` appAvailable an cf
`requires` installed
`onChange` reloaded
- disable = trivial $ File.notPresent (appVal an)
+ disable = File.notPresent (appVal an)
`describe` ("uwsgi app disable" ++ an)
`requires` installed
`onChange` reloaded