Both the guts of the PuppetBind::Provider::Nsupdate module and the type method of the dns_rr(nsupdate) provider produce and expect the type expressed as a string, but the resource_record(nsupdate) provider's type method produces symbols. This accidentally worked for a while, then it didn't. Also, in quoted_type? that's supposed to be an array of strings, not a quoted string.
45 lines
598 B
Ruby
45 lines
598 B
Ruby
require 'puppet_bind/provider/nsupdate'
|
|
|
|
Puppet::Type.type(:resource_record).provide(:nsupdate) do
|
|
|
|
include PuppetBind::Provider::NsUpdate
|
|
|
|
commands :dig => 'dig', :nsupdate => 'nsupdate'
|
|
|
|
def initialize(value={})
|
|
super(value)
|
|
@properties = {}
|
|
end
|
|
|
|
def data
|
|
query.map { |record| record[:rrdata] }.sort
|
|
end
|
|
|
|
def data=(data)
|
|
@properties[:rrdata] = data
|
|
end
|
|
|
|
private
|
|
|
|
def rrdata
|
|
data
|
|
end
|
|
|
|
def newdata
|
|
resource[:data]
|
|
end
|
|
|
|
def rrclass
|
|
resource[:rrclass]
|
|
end
|
|
|
|
def type
|
|
resource[:type].to_s
|
|
end
|
|
|
|
def name
|
|
resource[:record]
|
|
end
|
|
|
|
end
|