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

Safe Haskell | None
Language | Haskell98

Propellor.Container

Synopsis

- class IsContainer c where
- containerProps :: IsContainer c => c -> Props UnixLike
- setContainerProps :: IsContainer c => c -> Props metatypes -> c
- propagateContainer :: (IncludesInfo metatypes ~ True, IsContainer c) => String -> c -> (PropagateInfo -> Bool) -> Property metatypes -> Property metatypes
- propagatableInfo :: (PropagateInfo -> Bool) -> Info -> Info
- normalContainerInfo :: PropagateInfo -> Bool
- onlyPrivData :: PropagateInfo -> Bool

# Documentation

class IsContainer c where Source #

Minimal complete definition

containerProperties, containerInfo, setContainerProperties

Methods

containerProperties :: c -> [ChildProperty] Source #

containerInfo :: c -> Info Source #

setContainerProperties :: c -> [ChildProperty] -> c Source #

Instances

IsContainer Host Source # |
Methods containerProperties :: Host -> [ChildProperty] Source # containerInfo :: Host -> Info Source # setContainerProperties :: Host -> [ChildProperty] -> Host Source #
IsContainer Chroot Source # |
Methods containerProperties :: Chroot -> [ChildProperty] Source # containerInfo :: Chroot -> Info Source # setContainerProperties :: Chroot -> [ChildProperty] -> Chroot Source #
IsContainer Container Source # |
Methods containerProperties :: Container -> [ChildProperty] Source # containerInfo :: Container -> Info Source # setContainerProperties :: Container -> [ChildProperty] -> Container Source #
IsContainer Container Source # |
Methods containerProperties :: Container -> [ChildProperty] Source # containerInfo :: Container -> Info Source # setContainerProperties :: Container -> [ChildProperty] -> Container Source #

containerProps :: IsContainer c => c -> Props UnixLike Source #

Note that the metatype of a container's properties is not retained, so this defaults to UnixLike. So, using this with setContainerProps can add properties to a container that conflict with properties already in it. Use caution when using this; only add properties that do not have restricted targets.

setContainerProps :: IsContainer c => c -> Props metatypes -> c Source #

propagateContainer :: (IncludesInfo metatypes ~ True, IsContainer c) => String -> c -> (PropagateInfo -> Bool) -> Property metatypes -> Property metatypes Source #

Adjust the provided Property, adding to its propertyChidren the properties of the provided container.

The Info of the propertyChildren is adjusted to only include info that should be propagated out to the Property.

Any PrivInfo that uses HostContext is adjusted to use the name of the container as its context.

propagatableInfo :: (PropagateInfo -> Bool) -> Info -> Info Source #

Filters out parts of the Info that should not propagate out of a container.

normalContainerInfo :: PropagateInfo -> Bool Source #

onlyPrivData :: PropagateInfo -> Bool Source #