diff --git a/Propellor/Attr.hs b/Propellor/Attr.hs index a4d7a95..8c4a2ad 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 7abeb55..7c26f1d 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 diff --git a/TODO b/TODO index 7a1e1df..85875a9 100644 --- a/TODO +++ b/TODO @@ -23,4 +23,4 @@ PrivData..), or the public key should not be stored in the PrivData, and instead configured using the attr. Getting the ssh host key into the attr will allow automatically - exporting it via DNS. + exporting it via DNS (SSHFP record) diff --git a/config-joey.hs b/config-joey.hs index 4063aa3..eae3a15 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -48,18 +48,18 @@ hosts = -- (o) ` & Postfix.satellite & Docker.configured - & cname "shell.olduse.net" + & aka "shell.olduse.net" & JoeySites.oldUseNetShellBox - & cname "openid.kitenet.net" + & aka "openid.kitenet.net" & Docker.docked hosts "openid-provider" `requires` Apt.installed ["ntp"] - & cname "ancient.kitenet.net" + & aka "ancient.kitenet.net" & Docker.docked hosts "ancient-kitenet" -- I'd rather this were on diatom, but it needs unstable. - & cname "kgb.kitenet.net" + & aka "kgb.kitenet.net" & JoeySites.kgbServer & Docker.garbageCollected `period` Daily @@ -112,25 +112,25 @@ hosts = -- (o) ` & Apache.multiSSL & File.ownerGroup "/srv/web" "joey" "joey" - & cname "git.kitenet.net" - & cname "git.joeyh.name" + & aka "git.kitenet.net" + & aka "git.joeyh.name" & JoeySites.gitServer hosts - & cname "downloads.kitenet.net" + & aka "downloads.kitenet.net" & JoeySites.annexWebSite hosts "/srv/git/downloads.git" "downloads.kitenet.net" "840760dc-08f0-11e2-8c61-576b7e66acfd" [("turtle", "ssh://turtle.kitenet.net/~/lib/downloads/")] & JoeySites.annexRsyncServer - & cname "tmp.kitenet.net" + & aka "tmp.kitenet.net" & JoeySites.annexWebSite hosts "/srv/git/joey/tmp.git" "tmp.kitenet.net" "26fd6e38-1226-11e2-a75f-ff007033bdba" [] & JoeySites.twitRss - & cname "nntp.olduse.net" + & aka "nntp.olduse.net" & JoeySites.oldUseNetServer hosts & Apt.installed ["ntop"] @@ -285,11 +285,11 @@ monsters = -- but do want to track their public keys etc. , host "wren.kitenet.net" & ipv4 "80.68.85.49" & ipv6 "2001:41c8:125:49::10" - & cname "kite.kitenet.net" + & aka "kite.kitenet.net" , host "branchable.com" & ipv4 "66.228.46.55" & ipv6 "2600:3c03::f03c:91ff:fedf:c0e5" - & cname "olduse.net" - & cname "www.olduse.net" - & cname "git.olduse.net" + & aka "olduse.net" + & aka "www.olduse.net" + & aka "git.olduse.net" ] diff --git a/debian/changelog b/debian/changelog index ee7df1e..2442dd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ propellor (0.4.0) UNRELEASED; urgency=medium So Attr settings can be made inside a propertyList, for example. * Run all cron jobs under chronic from moreutils to avoid unnecessary mails. + * The `cname` property was renamed to `aka` as it does not always generate + CNAME in the DNS. -- Joey Hess Thu, 17 Apr 2014 21:00:43 -0400