summaryrefslogtreecommitdiff
path: root/lib/puppet/type/dns_record2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/type/dns_record2.rb')
-rw-r--r--lib/puppet/type/dns_record2.rb62
1 files changed, 33 insertions, 29 deletions
diff --git a/lib/puppet/type/dns_record2.rb b/lib/puppet/type/dns_record2.rb
index 2074782..98eaadb 100644
--- a/lib/puppet/type/dns_record2.rb
+++ b/lib/puppet/type/dns_record2.rb
@@ -1,8 +1,11 @@
Puppet::Type.newtype(:dns_record2) do
- @doc = %q{
- }
+ @doc = <<~EOF
+ A single DNS record.
- #"named-checkconf -j -D -F raw $zonename $zonefile"
+ Doesn't have any effect on the system by itself, but instead
+ registers data to the current catalog, which is later gathered by a
+ coresponding dns_zone2 resource.
+ EOF
newproperty(:ensure) do
newvalue(:present) do
@@ -29,45 +32,41 @@ Puppet::Type.newtype(:dns_record2) do
end
newparam(:name) do
+ desc <<~EOF
+ Explicitly not used as the key, since each key can contain many
+ EOF
end
newproperty(:type) do
- desc %q{
+ desc <<~EOF
Resource Record type, such as A, AAAA, ...
-
- Only a few types are supported, due to the DNS library only supporting these.
- }
- newvalues(:A,
- :AAAA,
- :CNAME,
- :HINFO,
- :MINFO,
- :MX,
- :NS,
- :PTR,
- :SOA,
- :TXT,
- :WKS,
- )
+ EOF
+ munge { |v| v.to_sym }
end
newproperty(:value) do
- desc %q{
+ desc <<~EOF
DNS payload. For example an IP address.
- }
+ EOF
end
newproperty(:key) do
- desc %q{
+ desc <<~EOF
DNS key.
Such as 'www'
- }
+
+ Will be treated as an absolute key if ending in a period, and
+ relative to the zone otherwise.
+ (NOTE this is handled by the provider)
+
+ '@' is the "empty" key.
+ EOF
end
newproperty(:zone) do
- desc %q{
- Zone this record belongs to
- }
+ desc <<~EOF
+ Zone this record belongs to.
+ EOF
munge do |value|
if value[-1] == '.'
@@ -79,15 +78,20 @@ Puppet::Type.newtype(:dns_record2) do
end
newproperty(:cls) do
- desc %q{
- }
+ desc <<~EOF
+ DNS class of this record.
+ Currently only IN works.
+ EOF
end
newproperty(:ttl) do
+ desc <<~EOF
+ TTL of this record.
+ EOF
end
# autobefore('dns::zone') { value(:zone) }
autonotify('dns_zone2') { [value(:zone)] }
# autobefore('dns_zone2') { [value(:zone)] }
- # TODO view
+ # TODO views
end