summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFélix Sipma2018-04-01 22:43:20 +0200
committerFélix Sipma2018-05-04 15:11:28 +0200
commit0f022f07523a2221d527c705caff2a2d8cc83a03 (patch)
treea2a11f861b2cf953a2a20cca6bc5bffda67b3c97 /src
parent02dcc859457e48686f0d5159375cbe8ef249d4c0 (diff)
Unbound: handle missing records
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Unbound.hs27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/Propellor/Property/Unbound.hs b/src/Propellor/Property/Unbound.hs
index 0d057924..a17e5dd4 100644
--- a/src/Propellor/Property/Unbound.hs
+++ b/src/Propellor/Property/Unbound.hs
@@ -126,19 +126,36 @@ genRecord dom (PTR revip) = Just $ unwords
, "PTR"
, dValue dom
]
-genRecord _ (CNAME _) = Nothing
-genRecord _ (NS _) = Nothing
-genRecord _ (TXT _) = Nothing
+genRecord dom (CNAME dest) = Just $ unwords
+ [ dValue dom
+ , "CNAME"
+ , dValue dest
+ ]
+genRecord dom (NS serv) = Just $ unwords
+ [ dValue dom
+ , "NS"
+ , dValue serv
+ ]
+genRecord dom (TXT txt) = Just $ unwords
+ [ dValue dom
+ , "TXT"
+ , txt
+ ]
genRecord dom (SRV priority weight port target) = Just $ unwords
[ dValue dom
- , "IN"
, "SRV"
, val priority
, val weight
, val port
, dValue target
]
-genRecord _ (SSHFP _ _ _) = Nothing
+genRecord dom (SSHFP algo hash fingerprint) = Just $ unwords
+ [ dValue dom
+ , "SSHFP"
+ , val algo
+ , val hash
+ , fingerprint
+ ]
genRecord _ (INCLUDE _) = Nothing
genAddressNoTtl :: BindDomain -> IPAddr -> String