summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Whitton2017-03-19 11:22:05 -0700
committerSean Whitton2017-03-19 11:22:05 -0700
commitdeda66755b5f4075909db3a5dcf45abb2c941f29 (patch)
tree33b40a41366444b2e8814ace727de0272fe35087 /src
parentec3615fb6789ed6b911bf436147db597a38e8aa1 (diff)
add Apt.hostMirrorIs
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Apt.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index abec1357..009b426b 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -20,6 +20,11 @@ import Propellor.Types.Info
data HostMirror = HostMirror Url
deriving (Eq, Show, Typeable)
+-- | Indicate host's preferred apt mirror (e.g. an apt cacher on the host's LAN)
+hostMirrorIs :: Url -> Property (HasInfo + UnixLike)
+hostMirrorIs u = pureInfoProperty (u ++ " apt mirror selected")
+ (InfoVal (HostMirror u))
+
getHostMirror :: Propellor Url
getHostMirror = do
mirrorInfo <- getHostMirrorInfo