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

Safe HaskellSafe-Inferred

Propellor.Types.Dns

Synopsis

Documentation

type Domain = StringSource

data IPAddr Source

Constructors

IPv4 String 
IPv6 String 

Instances

Eq IPAddr 
Ord IPAddr 
Read IPAddr 
Show IPAddr 

data NamedConf Source

Represents a bind 9 named.conf file.

Instances

Eq NamedConf 
Ord NamedConf 
Show NamedConf 

data DnsServerType Source

Constructors

Master 
Secondary 

Instances

data Zone Source

Represents a bind 9 zone file.

Constructors

Zone 

Fields

zDomain :: Domain
 
zSOA :: SOA
 
zHosts :: [(BindDomain, Record)]
 

Instances

Eq Zone 
Read Zone 
Show Zone 

data SOA Source

Every domain has a SOA record, which is big and complicated.

Constructors

SOA 

Fields

sDomain :: BindDomain

Typically ns1.your.domain

sSerial :: SerialNumber

The most important parameter is the serial number, which must increase after each change.

sRefresh :: Integer
 
sRetry :: Integer
 
sExpire :: Integer
 
sNegativeCacheTTL :: Integer
 

Instances

Eq SOA 
Read SOA 
Show SOA 

data Record Source

Types of DNS records.

This is not a complete list, more can be added.

Constructors

Address IPAddr 
CNAME BindDomain 
MX Int BindDomain 
NS BindDomain 
TXT String 
SRV Word16 Word16 Word16 BindDomain 

Instances

Eq Record 
Ord Record 
Read Record 
Show Record 

type SerialNumber = Word32Source

Bind serial numbers are unsigned, 32 bit integers.

data BindDomain Source

Domains in the zone file must end with a period if they are absolute.

Let's use a type to keep absolute domains straight from relative domains.

The RootDomain refers to the top level of the domain, so can be used to add nameservers, MX's, etc to a domain.

Instances

newtype NamedConfMap Source

Constructors

NamedConfMap (Map Domain NamedConf) 

Instances

Eq NamedConfMap 
Ord NamedConfMap 
Show NamedConfMap 
Monoid NamedConfMap

Adding a Master NamedConf stanza for a particulr domain always overrides an existing Secondary stanza for that domain, while a Secondary stanza is only added when there is no existing Master stanza.