propellor spin

This commit is contained in:
Joey Hess 2014-10-23 11:36:06 -04:00
parent fec304df54
commit ac7b182b5a
Failed to extract signature
2 changed files with 2 additions and 10 deletions

View File

@ -135,7 +135,7 @@ host hn = Host hn [] mempty
-- --
-- Can add Properties and RevertableProperties -- Can add Properties and RevertableProperties
(&) :: IsProp p => Host -> p -> Host (&) :: IsProp p => Host -> p -> Host
(Host hn ps is) & p = Host hn (ps ++ [toProp p]) (is <> getInfo p) (Host hn ps as) & p = Host hn (ps ++ [toProp p]) (as <> getInfo p)
infixl 1 & infixl 1 &
@ -145,14 +145,6 @@ h ! p = h & revert p
infixl 1 ! infixl 1 !
-- | Like (&), but adds the property as the first property of the host.
-- Normally, property order should not matter, but this is useful
-- when it does.
(&^) :: IsProp p => Host -> p -> Host
(Host hn ps is) &^ p = Host hn ([toProp p] ++ ps) (getInfo p <> is)
infixl 1 &^
-- Changes the action that is performed to satisfy a property. -- Changes the action that is performed to satisfy a property.
adjustProperty :: Property -> (Propellor Result -> Propellor Result) -> Property adjustProperty :: Property -> (Propellor Result -> Propellor Result) -> Property
adjustProperty p f = p { propertySatisfy = f (propertySatisfy p) } adjustProperty p f = p { propertySatisfy = f (propertySatisfy p) }

View File

@ -157,7 +157,7 @@ mkContainer cid@(ContainerId hn _cn) h = Container
h' = h h' = h
-- Restart by default so container comes up on -- Restart by default so container comes up on
-- boot or when docker is upgraded. -- boot or when docker is upgraded.
&^ restart RestartAlways -- &^ restart RestartAlways
-- Expose propellor directory inside the container. -- Expose propellor directory inside the container.
& volume (localdir++":"++localdir) & volume (localdir++":"++localdir)
-- Name the container in a predictable way so we -- Name the container in a predictable way so we