The `cname` property was renamed to `aka` as it does not always generate CNAME in the DNS.

This commit is contained in:
Joey Hess 2014-04-18 23:41:26 -04:00
parent 21bb63ab58
commit 7e9853520b
5 changed files with 21 additions and 24 deletions

View File

@ -41,16 +41,11 @@ ipv6 :: String -> Property
ipv6 addr = pureAttrProperty ("ipv6 " ++ addr) ipv6 addr = pureAttrProperty ("ipv6 " ++ addr)
(addDNS $ Address $ IPv6 addr) (addDNS $ Address $ IPv6 addr)
-- | Indicate that a host has a CNAME pointing at it in the DNS. -- | Indicates another name for the host in the DNS.
cname :: Domain -> Property aka :: Domain -> Property
cname domain = pureAttrProperty ("cname " ++ domain) aka domain = pureAttrProperty ("aka " ++ domain)
(addDNS $ CNAME $ AbsDomain 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 -> SetAttr
addDNS record d = d { _dns = S.insert record (_dns d) } addDNS record d = d { _dns = S.insert record (_dns d) }

View File

@ -33,7 +33,7 @@ import Data.List
-- --
-- > host "foo.example.com" -- > host "foo.example.com"
-- > & ipv4 "192.168.1.1" -- > & 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. -- 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. -- repository to the SerialNumber.
-- --
-- Handy trick: You don't need to list IPAddrs in the [Record], -- 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 :: Domain -> SerialNumber -> [Record] -> SOA
mkSOA d sn rs = SOA mkSOA d sn rs = SOA
{ sDomain = AbsDomain d { sDomain = AbsDomain d

2
TODO
View File

@ -23,4 +23,4 @@
PrivData..), or the public key should not be stored in PrivData..), or the public key should not be stored in
the PrivData, and instead configured using the attr. the PrivData, and instead configured using the attr.
Getting the ssh host key into the attr will allow automatically Getting the ssh host key into the attr will allow automatically
exporting it via DNS. exporting it via DNS (SSHFP record)

View File

@ -48,18 +48,18 @@ hosts = -- (o) `
& Postfix.satellite & Postfix.satellite
& Docker.configured & Docker.configured
& cname "shell.olduse.net" & aka "shell.olduse.net"
& JoeySites.oldUseNetShellBox & JoeySites.oldUseNetShellBox
& cname "openid.kitenet.net" & aka "openid.kitenet.net"
& Docker.docked hosts "openid-provider" & Docker.docked hosts "openid-provider"
`requires` Apt.installed ["ntp"] `requires` Apt.installed ["ntp"]
& cname "ancient.kitenet.net" & aka "ancient.kitenet.net"
& Docker.docked hosts "ancient-kitenet" & Docker.docked hosts "ancient-kitenet"
-- I'd rather this were on diatom, but it needs unstable. -- I'd rather this were on diatom, but it needs unstable.
& cname "kgb.kitenet.net" & aka "kgb.kitenet.net"
& JoeySites.kgbServer & JoeySites.kgbServer
& Docker.garbageCollected `period` Daily & Docker.garbageCollected `period` Daily
@ -112,25 +112,25 @@ hosts = -- (o) `
& Apache.multiSSL & Apache.multiSSL
& File.ownerGroup "/srv/web" "joey" "joey" & File.ownerGroup "/srv/web" "joey" "joey"
& cname "git.kitenet.net" & aka "git.kitenet.net"
& cname "git.joeyh.name" & aka "git.joeyh.name"
& JoeySites.gitServer hosts & JoeySites.gitServer hosts
& cname "downloads.kitenet.net" & aka "downloads.kitenet.net"
& JoeySites.annexWebSite hosts "/srv/git/downloads.git" & JoeySites.annexWebSite hosts "/srv/git/downloads.git"
"downloads.kitenet.net" "downloads.kitenet.net"
"840760dc-08f0-11e2-8c61-576b7e66acfd" "840760dc-08f0-11e2-8c61-576b7e66acfd"
[("turtle", "ssh://turtle.kitenet.net/~/lib/downloads/")] [("turtle", "ssh://turtle.kitenet.net/~/lib/downloads/")]
& JoeySites.annexRsyncServer & JoeySites.annexRsyncServer
& cname "tmp.kitenet.net" & aka "tmp.kitenet.net"
& JoeySites.annexWebSite hosts "/srv/git/joey/tmp.git" & JoeySites.annexWebSite hosts "/srv/git/joey/tmp.git"
"tmp.kitenet.net" "tmp.kitenet.net"
"26fd6e38-1226-11e2-a75f-ff007033bdba" "26fd6e38-1226-11e2-a75f-ff007033bdba"
[] []
& JoeySites.twitRss & JoeySites.twitRss
& cname "nntp.olduse.net" & aka "nntp.olduse.net"
& JoeySites.oldUseNetServer hosts & JoeySites.oldUseNetServer hosts
& Apt.installed ["ntop"] & Apt.installed ["ntop"]
@ -285,11 +285,11 @@ monsters = -- but do want to track their public keys etc.
, host "wren.kitenet.net" , host "wren.kitenet.net"
& ipv4 "80.68.85.49" & ipv4 "80.68.85.49"
& ipv6 "2001:41c8:125:49::10" & ipv6 "2001:41c8:125:49::10"
& cname "kite.kitenet.net" & aka "kite.kitenet.net"
, host "branchable.com" , host "branchable.com"
& ipv4 "66.228.46.55" & ipv4 "66.228.46.55"
& ipv6 "2600:3c03::f03c:91ff:fedf:c0e5" & ipv6 "2600:3c03::f03c:91ff:fedf:c0e5"
& cname "olduse.net" & aka "olduse.net"
& cname "www.olduse.net" & aka "www.olduse.net"
& cname "git.olduse.net" & aka "git.olduse.net"
] ]

2
debian/changelog vendored
View File

@ -5,6 +5,8 @@ propellor (0.4.0) UNRELEASED; urgency=medium
So Attr settings can be made inside a propertyList, for example. So Attr settings can be made inside a propertyList, for example.
* Run all cron jobs under chronic from moreutils to avoid unnecessary * Run all cron jobs under chronic from moreutils to avoid unnecessary
mails. mails.
* The `cname` property was renamed to `aka` as it does not always generate
CNAME in the DNS.
-- Joey Hess <joeyh@debian.org> Thu, 17 Apr 2014 21:00:43 -0400 -- Joey Hess <joeyh@debian.org> Thu, 17 Apr 2014 21:00:43 -0400