diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-19 08:15:32 -0700 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-19 08:15:32 -0700 |
| commit | 2cdf59fadde60249491d7bb88a3625c580d2027a (patch) | |
| tree | 024a48935d100fd7c367743198fcc635d9f5c264 /src | |
| parent | 21eaec2416dc44a9341699e0772d54397d5f5201 (diff) | |
add withHostMirror helper
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 5 |
1 files changed, 5 insertions, 0 deletions
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" |
