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

Safe HaskellNone




data PrivDataField Source #

Note that removing or changing constructors or changing types will break the serialized privdata files, so don't do that! It's fine to add new constructors.


SshPubKey SshKeyType UserName

Not used anymore, but retained to avoid breaking serialization of old files

SshPrivKey SshKeyType UserName

For host key, use empty UserName

SshAuthorizedKeys UserName 
Password UserName 
CryptPassword UserName 
PrivFile FilePath 
DnsSec DnsSecKey 

newtype Context Source #

A context in which a PrivDataField is used.

Often this will be a domain name. For example, Context "" could be used for the SSL cert for the web server serving that domain. Multiple hosts might use that privdata.

This appears in serialized privdata files.


Context String 

class IsContext c where Source #

Class of things that can be used as a Context.

Minimal complete definition

asContext, asHostContext

anyContext :: Context Source #

Use when a PrivDataField is not dependent on any paricular context.

hostContext :: HostContext Source #

Makes a HostContext that consists just of the hostname.

newtype PrivData Source #

Contains the actual private data.

Note that this may contain exta newlines at the end, or they may have been stripped off, depending on how the user entered the privdata, and which version of propellor stored it. Use the accessor functions below to avoid newline problems.


PrivData String 

privDataLines :: PrivData -> [String] Source #

When PrivData is the content of a file, this is the lines thereof.

privDataVal :: PrivData -> String Source #

When the PrivData is a single value, like a password, this extracts it. Note that if multiple lines are present in the PrivData, only the first is returned; there is never a newline in the String.

privDataByteString :: PrivData -> ByteString Source #

Use to get ByteString out of PrivData.

sshKeyTypeParam :: SshKeyType -> String Source #

Parameter that would be passed to ssh-keygen to generate key of this type