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

Safe Haskell | None
Language | Haskell2010

Propellor.Info

Synopsis

- osDebian :: DebianSuite -> Architecture -> Property (HasInfo + Debian)
- osBuntish :: Release -> Architecture -> Property (HasInfo + Buntish)
- osArchLinux :: Architecture -> Property (HasInfo + ArchLinux)
- osFreeBSD :: FreeBSDRelease -> Architecture -> Property (HasInfo + FreeBSD)
- setInfoProperty :: (MetaTypes metatypes' ~ (+) HasInfo metatypes, SingI metatypes') => Property metatypes -> Info -> Property (MetaTypes metatypes')
- addInfoProperty :: IncludesInfo metatypes ~ 'True => Property metatypes -> Info -> Property metatypes
- pureInfoProperty :: IsInfo v => Desc -> v -> Property (HasInfo + UnixLike)
- pureInfoProperty' :: Desc -> Info -> Property (HasInfo + UnixLike)
- askInfo :: IsInfo v => Propellor v
- getOS :: Propellor (Maybe System)
- hasContainerCapability :: ContainerCapability -> Propellor Bool
- ipv4 :: String -> Property (HasInfo + UnixLike)
- ipv6 :: String -> Property (HasInfo + UnixLike)
- alias :: Domain -> Property (HasInfo + UnixLike)
- addDNS :: Bool -> Record -> Property (HasInfo + UnixLike)
- hostMap :: [Host] -> Map HostName Host
- aliasMap :: [Host] -> Map HostName Host
- findHost :: [Host] -> HostName -> Maybe Host
- findHostNoAlias :: [Host] -> HostName -> Maybe Host
- getAddresses :: Info -> [IPAddr]
- hostAddresses :: HostName -> [Host] -> [IPAddr]

# Documentation

osDebian :: DebianSuite -> Architecture -> Property (HasInfo + Debian) Source #

Specifies that a host's operating system is Debian, and further indicates the suite and architecture.

This provides info for other Properties, so they can act conditionally on the details of the OS.

It also lets the type checker know that all the properties of the host must support Debian.

    	& osDebian (Stable "buster") X86_64

osBuntish :: Release -> Architecture -> Property (HasInfo + Buntish) Source #

Specifies that a host's operating system is a well-known Debian derivative founded by a space tourist.

(The actual name of this distribution is not used in Propellor per http://joeyh.name/blog/entry/trademark_nonsense/)

osArchLinux :: Architecture -> Property (HasInfo + ArchLinux) Source #

Specifies that a host's operating system is Arch Linux

osFreeBSD :: FreeBSDRelease -> Architecture -> Property (HasInfo + FreeBSD) Source #

Specifies that a host's operating system is FreeBSD and further indicates the release and architecture.

setInfoProperty :: (MetaTypes metatypes' ~ (+) HasInfo metatypes, SingI metatypes') => Property metatypes -> Info -> Property (MetaTypes metatypes') Source #

Adds info to a Property.

The new Property will include HasInfo in its metatypes.

addInfoProperty :: IncludesInfo metatypes ~ 'True => Property metatypes -> Info -> Property metatypes Source #

Adds more info to a Property that already HasInfo.

pureInfoProperty :: IsInfo v => Desc -> v -> Property (HasInfo + UnixLike) Source #

Makes a property that does nothing but set some `Info`.

pureInfoProperty' :: Desc -> Info -> Property (HasInfo + UnixLike) Source #

askInfo :: IsInfo v => Propellor v Source #

Gets a value from the host's Info.

getOS :: Propellor (Maybe System) Source #

hasContainerCapability :: ContainerCapability -> Propellor Bool Source #

Checks if a ContainerCapability is set in the current Info.

ipv4 :: String -> Property (HasInfo + UnixLike) Source #

Indicate that a host has an A record in the DNS.

When propellor is used to deploy a DNS server for a domain, the hosts in the domain are found by looking for these and similar properites.

When propellor --spin is used to deploy a host, it checks if the host's IP Property matches the DNS. If the DNS is missing or out of date, the host will instead be contacted directly by IP address.

ipv6 :: String -> Property (HasInfo + UnixLike) Source #

Indicate that a host has an AAAA record in the DNS.

alias :: Domain -> Property (HasInfo + UnixLike) Source #

Indicates another name for the host in the DNS.

When the host's ipv4/ipv6 addresses are known, the alias is set up to use their address, rather than using a CNAME. This avoids various problems with CNAMEs, and also means that when multiple hosts have the same alias, a DNS round-robin is automatically set up.

addDNS Source #

Arguments

:: Bool | When used in a container, the DNS info will only propagate out the the Host when this is True.
-> Record |
-> Property (HasInfo + UnixLike) |

Add a DNS Record.

hostMap :: [Host] -> Map HostName Host Source #

aliasMap :: [Host] -> Map HostName Host Source #

findHost :: [Host] -> HostName -> Maybe Host Source #

findHostNoAlias :: [Host] -> HostName -> Maybe Host Source #

getAddresses :: Info -> [IPAddr] Source #

hostAddresses :: HostName -> [Host] -> [IPAddr] Source #