From def53b64cc17b95eb5729dd97a800dfe1257b352 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Sep 2015 08:19:02 -0700 Subject: Added Propellor.Property.Rsync. WIP; untested Convert Info to use Data.Dynamic, so properties can export and consume info of any type that is Typeable and a Monoid, including data types private to a module. (API change) Thanks to Joachim Breitner for the idea. --- src/Propellor/PropAccum.hs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/Propellor/PropAccum.hs') diff --git a/src/Propellor/PropAccum.hs b/src/Propellor/PropAccum.hs index 20d083cb..d2736b50 100644 --- a/src/Propellor/PropAccum.hs +++ b/src/Propellor/PropAccum.hs @@ -13,6 +13,7 @@ import Data.Monoid import Propellor.Types import Propellor.Property +import Propellor.Types.Info -- | Starts accumulating the properties of a Host. -- @@ -71,12 +72,6 @@ infixl 1 ! -- -- The Info of the propertyChildren is adjusted to only include -- info that should be propigated out to the Property. --- --- DNS Info is propigated, so that eg, aliases of a PropAccum --- are reflected in the dns for the host where it runs. --- --- PrivData Info is propigated, so that properties used inside a --- PropAccum will have the necessary PrivData available. propigateContainer :: (PropAccum container) => container @@ -90,10 +85,6 @@ propigateContainer c prop = infoProperty where hostprops = map go $ getProperties c go p = - let i = propertyInfo p - i' = mempty - { _dns = _dns i - , _privData = _privData i - } + let i = propigatableInfo (propertyInfo p) cs = map go (propertyChildren p) - in infoProperty (propertyDesc p) (propertySatisfy p) i' cs + in infoProperty (propertyDesc p) (propertySatisfy p) i cs -- cgit v1.2.3