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

Safe HaskellNone

Propellor.Property

Synopsis

Documentation

propertyList :: Desc -> [Property] -> PropertySource

Combines a list of properties, resulting in a single property that when run will run each property in the list in turn, and print out the description of each as it's run. Does not stop on failure; does propigate overall success/failure.

combineProperties :: Desc -> [Property] -> PropertySource

Combines a list of properties, resulting in one property that ensures each in turn, stopping on failure.

before :: Property -> Property -> PropertySource

Combines together two properties, resulting in one property that ensures the first, and if the first succeeds, ensures the second. The property uses the description of the first property.

flagFile :: Property -> FilePath -> PropertySource

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

check :: IO Bool -> Property -> PropertySource

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

trivial :: Property -> PropertySource

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) -> PropertySource

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 -> RevertablePropertySource

Undoes the effect of a property.

host :: HostName -> HostSource

Starts accumulating the properties of a Host.

 host "example.com"
 	& someproperty
 	! oldproperty
 	& otherproperty

(&) :: IsProp p => Host -> p -> HostSource

Adds a property to a Host

Can add Properties and RevertableProperties

(!) :: Host -> RevertableProperty -> HostSource

Adds a property to the Host in reverted form.

combineSetAttr :: (IsProp p, IsProp q) => p -> q -> SetAttrSource

combineSetAttrs :: IsProp p => [p] -> SetAttrSource