From cd37316dd5b512930bd9bce50617d4b16eee985a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Jul 2014 17:54:06 -0400 Subject: propigate required privdata fields out from docker containers to the hosts they're docked in --- src/Propellor/PrivData.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Propellor/PrivData.hs') diff --git a/src/Propellor/PrivData.hs b/src/Propellor/PrivData.hs index e9e7e47f..d7d81a21 100644 --- a/src/Propellor/PrivData.hs +++ b/src/Propellor/PrivData.hs @@ -18,6 +18,7 @@ import qualified Data.Set as S import Propellor.Types import Propellor.Types.Info import Propellor.Message +import Propellor.Info import Utility.Monad import Utility.PartialPrelude import Utility.Exception @@ -62,6 +63,10 @@ withPrivData field context@(Context cname) mkprop = addinfo $ mkprop $ \a -> return FailedChange addinfo p = p { propertyInfo = propertyInfo p <> mempty { _privDataFields = S.singleton (field, context) } } +addPrivDataField :: (PrivDataField, Context) -> Property +addPrivDataField v = pureInfoProperty (show v) $ + mempty { _privDataFields = S.singleton v } + {- Gets the requested field's value, in the specified context if it's - available, from the host's local privdata cache. -} getLocalPrivData :: PrivDataField -> Context -> IO (Maybe PrivData) -- cgit v1.2.3