From 7ec92d395cd5a8a4ef50b22c654d1a5ad73841b4 Mon Sep 17 00:00:00 2001 From: Nate Riffe Date: Mon, 20 Jan 2014 16:25:16 -0600 Subject: [PATCH] Fixes a problem with the split of dig's output Split at whitespace rather than tabs, since dig is "smart" about formatting. The bug was causing superfluous updates. --- Modulefile | 2 +- lib/puppet/provider/dns_rr/nsupdate.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modulefile b/Modulefile index 0501a34..0c575d7 100644 --- a/Modulefile +++ b/Modulefile @@ -1,5 +1,5 @@ name 'inkblot/bind' -version '2.0.0' +version '2.0.1' source 'git://github.com/inkblot/puppet-bind' author 'inkblot' license 'Apache 2.0' diff --git a/lib/puppet/provider/dns_rr/nsupdate.rb b/lib/puppet/provider/dns_rr/nsupdate.rb index e7cc9ae..908401b 100644 --- a/lib/puppet/provider/dns_rr/nsupdate.rb +++ b/lib/puppet/provider/dns_rr/nsupdate.rb @@ -108,7 +108,7 @@ private def query unless @query @query = dig("@#{server}", '-c', rrclass, '+noall', '+answer', name, type).lines.map do |line| - linearray = line.chomp.split /\t+/ + linearray = line.chomp.split /\s+/ { :name => linearray[0], :ttl => linearray[1],