inkblot / puppet-bind

18 stars 82 forks source link

Ability to manage SOA RR #159

Open gramsa49 opened 4 years ago

gramsa49 commented 4 years ago

It would be useful to manage the SOA record using this module. This record type is not supported. The template used to create the zone file contains a SOA record that is not accurate for most deployments.

[user@node puppet-bind]$ git diff
diff --git a/README.md b/README.md
index ee505b2..0486b44 100644
--- a/README.md
+++ b/README.md
@@ -313,7 +313,7 @@ Puppet.

 `record` is required, and is the fully qualified record to be managed.

-`type` is required, and is the record type. It must be one of: `A` `AAAA` `CNAME` `NS` `MX` `SPF` `SRV` `NAPTR` `PTR` or
+`type` is required, and is the record type. It must be one of: `SOA` `A` `AAAA` `CNAME` `NS` `MX` `SPF` `SRV` `NAPTR` `PTR` or
 `TXT`. Other DNS record types are not currently supported.

 `rrclass` is the class of the record. The default value is `IN` and allowed values are `IN`, `CH`, and `HS`.
diff --git a/lib/puppet/type/resource_record.rb b/lib/puppet/type/resource_record.rb
index 2a7c228..d976044 100644
--- a/lib/puppet/type/resource_record.rb
+++ b/lib/puppet/type/resource_record.rb
@@ -30,7 +30,7 @@ Puppet::Type.newtype(:resource_record) do
   newparam(:type) do
     desc 'The record type'
     isrequired
-    newvalues 'A', 'AAAA', 'CNAME', 'NS', 'MX', 'SPF', 'SRV', 'NAPTR', 'PTR', 'TXT', 'DS', 'TLSA', 'SSHFP'
+    newvalues 'SOA', 'A', 'AAAA', 'CNAME', 'NS', 'MX', 'SPF', 'SRV', 'NAPTR', 'PTR', 'TXT', 'DS', 'TLSA', 'SSHFP'
   end

   newparam(:record) do