Commit Graph

23 Commits

Author SHA1 Message Date
Nate Riffe
2fb9d23c01 Check for API support for autorequire
`Socket.ip_address_list` is a new addition to ruby 1.9. Maintain support for
ruby 1.8.7 by making the new autorequire feature of `resource_record`
conditional on the existence of the required API.
2016-01-29 06:30:44 -06:00
Nate Riffe
6d655fbfbc When a record is local, require the service 2015-12-27 09:22:20 -06:00
Thomas Sturm
4ac574742a remove escaped semicolons and additional spaces from dig query output for certain types 2015-10-25 12:10:29 +01:00
Nate Riffe
b532680b3b Merge pull request #31 from norcams/keyfile_resource_record
Support custom keyfile paths
2015-06-12 19:16:45 -05:00
Nate Riffe
a0f5ebde8a Make ensure => absent work again
The incremental update change made NS record updates work for non-glue NS
records, but broke `ensure => absent` because there is no semantic guarantee
that the contents of the `data` member match what's in DNS. Set math ensures
that hilarity ensues.
2015-05-22 07:49:36 -05:00
Nate Riffe
7555cdd4e0 Fix type handling
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.
2015-05-21 14:24:35 -05:00
Nate Riffe
f2593601e8 Automatic quote and unquote TXT and SPF
TXT and SPF record values have to be quoted in the nsupdate script in order to
preserve the integrity of the string.
2015-05-19 14:29:33 -05:00
Doug Neal
882214a2a9 On resource_record validation failure, raise an ArgumentError instead of calling Util::Errors.fail 2015-05-14 14:50:01 +01:00
Nate Riffe
ce0dada818 Also supply +norecurse
This should be universal, since we are explicitly querying the server where
we'll apply a change via nsupdate, therefore it must be an authority.
2015-05-05 12:40:22 -05:00
Nate Riffe
019aefac22 Allow response records from other sections
DNS queries for delegation records to poorly constructed zones won't have
answers, but they will have authority. Also, +nosearch
2015-05-05 11:52:51 -05:00
Nate Riffe
827fb1e88f Update RRData incrementally
Compute the adds and deletes required to get from existing RRData to new RRData
and perform just those operations instead of doing a complete drop/add of the
entire RRData set. Also during an update, do adds before deletes. This
eliminates the existence gap and fixes #29
2015-05-01 08:01:12 -05:00
Jan Ivar Beddari
53d60fe8a7 Support custom keyfile paths
This makes it possible to use resource_record with "standalone"
keyfiles by introducing a keyfile parameter
2015-04-17 13:01:56 +02:00
Tilo Klausing
97387e441a added record type DS (Pt 2) 2015-02-12 21:32:13 +01:00
Tilo Klausing
f36cd04732 added record type DS 2015-02-12 21:31:59 +01:00
Nate Riffe
9b1cbacee0 Give bind::key the ability to generate keys
Also, allow them to be placed elsewhere in the filesystem and make it possible
to exclude a key from the named configuration.
2015-01-18 10:11:24 -06:00
Nate Riffe
f90f0f5caf Deprecate dns_rr 2014-12-10 18:31:27 -06:00
Nate Riffe
5cff0ac97e Support wildcard DNS names 2014-09-13 09:13:18 -05:00
Nate Riffe
c0143b2ca7 Create resource_record type
Abstract out the nsupdate provider logic and implement a new resource_record
type around it which applies no semantic value to its title.

Also: support SPF and TXT records, include isrequired on required parameters
(though it doesn't seem to work as advertised)
2014-09-10 13:02:31 -05:00
Nate Riffe
02db5f35a2 Use tsig parameter for dig, too.
Add the tsig_param when invoking dig using the -y command line option. This
allows dig and nsupdate to operate in the same view when views are matched by
tsig signature.
2014-09-05 09:45:15 -05:00
Nate Riffe
3f3e456ab8 Retain the full RRDATA in linearray[4] 2014-04-14 11:16:40 -05:00
Nate Riffe
7bbe9c36f7 Reorder dig params to fetch correct data 2014-04-14 08:28:44 -05:00
Nate Riffe
7ec92d395c 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.
2014-01-20 16:25:16 -06:00
Nate Riffe
3e6ab1b0d4 Creates a dns_rr resource for managing RRs 2013-11-30 19:27:48 -06:00