From 2cdf59fadde60249491d7bb88a3625c580d2027a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 19 Mar 2017 08:15:32 -0700 Subject: add withHostMirror helper --- src/Propellor/Property/Apt.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 70b9474e..29f453a9 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -33,6 +33,11 @@ getHostMirror = do getHostMirrorInfo :: Propellor (Maybe HostMirror) getHostMirrorInfo = fromInfoVal <$> askInfo +withHostMirror :: Desc -> (Url -> Property DebianLike) -> Property DebianLike +withHostMirror desc mkp = property' desc $ \w -> do + u <- getHostMirror + ensureProperty w (mkp u) + sourcesList :: FilePath sourcesList = "/etc/apt/sources.list" -- cgit v1.2.3