propellor-2.2.0: property-based host configuration management in haskell

Safe HaskellNone




property :: Desc -> Propellor Result -> Property NoInfo Source

Constructs a Property, from a description and an action to run to ensure the Property is met.

flagFile :: Property i -> FilePath -> Property i Source

Makes a perhaps non-idempotent Property be idempotent by using a flag file to indicate whether it has run before. Use with caution.

onChange :: Combines (Property x) (Property y) => Property x -> Property y -> CombinedType (Property x) (Property y) Source

Whenever a change has to be made for a Property, causes a hook Property to also be run, but not otherwise.

(==>) :: IsProp (Property i) => Desc -> Property i -> Property i infixl 1 Source

Alias for flip describe

check :: IO Bool -> Property i -> Property i Source

Makes a Property only need to do anything when a test succeeds.

fallback :: Combines (Property p1) (Property p2) => Property p1 -> Property p2 -> Property (CInfo p1 p2) Source

Tries the first property, but if it fails to work, instead uses the second.

trivial :: Property i -> Property i Source

Marks a Property as trivial. It can only return FailedChange or NoChange.

Useful when it's just as expensive to check if a change needs to be made as it is to just idempotently assure the property is satisfied. For example, chmodding a file.

withOS :: Desc -> (Maybe System -> Propellor Result) -> Property NoInfo Source

Makes a property that is satisfied differently depending on the host's operating system.

Note that the operating system may not be declared for some hosts.

revert :: RevertableProperty -> RevertableProperty Source

Undoes the effect of a property.

endAction :: Desc -> (Result -> Propellor Result) -> Propellor () Source

Registers an action that should be run at the very end,