We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dddbe28 + 6d655fb commit 7758226Copy full SHA for 7758226
lib/puppet/type/resource_record.rb
@@ -1,6 +1,20 @@
1
+require 'socket'
2
+require 'resolv'
3
+
4
Puppet::Type.newtype(:resource_record) do
5
@doc = 'A Resource Record in the Domain Name System'
6
7
+ autorequire(:service) do
8
+ reqs = []
9
+ # Depend on the bind service if the record is local
10
+ reqs << 'bind' if Socket.ip_address_list.any? do |intf|
11
+ Resolv.getaddresses(self[:server]).any? do |addr|
12
+ intf.ip_address === addr
13
+ end
14
15
+ reqs
16
17
18
ensurable
19
20
newparam(:title, :namevar => true) do
0 commit comments