diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-18 23:41:26 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-18 23:41:26 -0400 |
| commit | 7e9853520b5b7233ce9a9c8153f6c366cab0ee39 (patch) | |
| tree | d0db9a167ace047e4e7ecbe83ed419faf7d63b59 /Propellor | |
| parent | 21bb63ab58fe4fde0bc9ff15e1e98dcacc2f845b (diff) | |
The `cname` property was renamed to `aka` as it does not always generate CNAME in the DNS.
Diffstat (limited to 'Propellor')
| -rw-r--r-- | Propellor/Attr.hs | 11 | ||||
| -rw-r--r-- | Propellor/Property/Dns.hs | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/Propellor/Attr.hs b/Propellor/Attr.hs index a4d7a958..8c4a2add 100644 --- a/Propellor/Attr.hs +++ b/Propellor/Attr.hs @@ -41,16 +41,11 @@ ipv6 :: String -> Property ipv6 addr = pureAttrProperty ("ipv6 " ++ addr) (addDNS $ Address $ IPv6 addr) --- | Indicate that a host has a CNAME pointing at it in the DNS. -cname :: Domain -> Property -cname domain = pureAttrProperty ("cname " ++ domain) +-- | Indicates another name for the host in the DNS. +aka :: Domain -> Property +aka domain = pureAttrProperty ("aka " ++ domain) (addDNS $ CNAME $ AbsDomain domain) -cnameFor :: Domain -> (Domain -> Property) -> Property -cnameFor domain mkp = - let p = mkp domain - in p { propertyAttr = propertyAttr p . addDNS (CNAME $ AbsDomain domain) } - addDNS :: Record -> SetAttr addDNS record d = d { _dns = S.insert record (_dns d) } diff --git a/Propellor/Property/Dns.hs b/Propellor/Property/Dns.hs index 7abeb552..7c26f1d5 100644 --- a/Propellor/Property/Dns.hs +++ b/Propellor/Property/Dns.hs @@ -33,7 +33,7 @@ import Data.List -- -- > host "foo.example.com" -- > & ipv4 "192.168.1.1" --- > & cname "mail.exmaple.com" +-- > & aka "mail.exmaple.com" -- -- Will cause that host and its cnames to appear in the zone file. -- @@ -112,7 +112,7 @@ servingZones zs = hasContent namedconf (concatMap confStanza zs) -- repository to the SerialNumber. -- -- Handy trick: You don't need to list IPAddrs in the [Record], --- just make some Host sets its cname to the root of domain. +-- just make some Host sets its `aka` to the root of domain. mkSOA :: Domain -> SerialNumber -> [Record] -> SOA mkSOA d sn rs = SOA { sDomain = AbsDomain d |
