From 5da737d027c6858fe737f6611d497b79287ec5ea Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 21:03:42 -0400 Subject: [PATCH] tweaks --- Propellor.hs | 1 - Property/Docker.hs | 11 ++++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Propellor.hs b/Propellor.hs index 8b9b6ee..8b1016d 100644 --- a/Propellor.hs +++ b/Propellor.hs @@ -24,7 +24,6 @@ getProperties hostname@"clam.kitenet.net" = -- Clam is a tor bridge. , Tor.isBridge -- I play with docker on clam. - , Apt.installed ["docker.io"] , Docker.configured -- This is not an important system so I don't want to need to -- manually upgrade it. diff --git a/Property/Docker.hs b/Property/Docker.hs index 9d01d0b..ebb3d3a 100644 --- a/Property/Docker.hs +++ b/Property/Docker.hs @@ -2,10 +2,15 @@ module Property.Docker where import Common import qualified Property.File as File +import qualified Property.Apt as Apt {- Configures docker with an authentication file, so that images can be - pushed to index.docker.io. -} configured :: Property -configured = Property "docker configured" $ - withPrivData DockerAuthentication $ \cfg -> - ensureProperty $ "/root/.dockercfg" `File.hasContent` (lines cfg) +configured = Property "docker configured" go `requires` installed + where + go = withPrivData DockerAuthentication $ \cfg -> ensureProperty $ + "/root/.dockercfg" `File.hasContent` (lines cfg) + +installed :: Property +installed = Apt.installed ["docker.io"]