summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-04-18 23:41:26 -0400
committerJoey Hess2014-04-18 23:41:26 -0400
commit7e9853520b5b7233ce9a9c8153f6c366cab0ee39 (patch)
treed0db9a167ace047e4e7ecbe83ed419faf7d63b59
parent21bb63ab58fe4fde0bc9ff15e1e98dcacc2f845b (diff)
The `cname` property was renamed to `aka` as it does not always generate CNAME in the DNS.
-rw-r--r--Propellor/Attr.hs11
-rw-r--r--Propellor/Property/Dns.hs4
-rw-r--r--TODO2
-rw-r--r--config-joey.hs26
-rw-r--r--debian/changelog2
5 files changed, 21 insertions, 24 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
diff --git a/TODO b/TODO
index 7a1e1df6..85875a9d 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 4063aa31..eae3a155 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 ee7df1e8..2442dd18 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 <joeyh@debian.org> Thu, 17 Apr 2014 21:00:43 -0400