Commit Graph

42 Commits

Author SHA1 Message Date
Nate Riffe
40531e21eb Implement a helper script for zone reloads
It turns out the `rndc` command that was intended to reload a managed zone
wasn't working (see PR #91 for reference) if more than one view included the
zone. The helper script is really just a wrapper around the `rndc` command
itself, it translates its final parameter into a domain/class/view tuple and
pass the leading parameters and the tuple to `rndc`.
2016-07-07 21:15:41 -05:00
Nate Riffe
88481f94fd Finalize the 6.0-prerelease branch 2016-07-04 09:39:51 -05:00
Nate Riffe
d50406d0df Merge remote-tracking branch 'ocado/notify-source' into 6.0-prerelease 2016-04-20 08:02:26 -05:00
Alex Frolkin
0f5d3e6019 Add support for notify-source and also-notify
Conflicts:
	templates/view.erb
2016-04-15 15:29:31 +01:00
Hal Deadman
aadc1f2f89 support forwarding a zone to a dns server on port other than 53
e.g. Consul runs on 8600
https://www.consul.io/docs/guides/forwarding.html
zone "consul" IN {
  type forward;
  forward only;
  forwarders { 127.0.0.1 port 8600; };
};
2016-02-10 10:47:12 -05:00
Nate Riffe
0b674de1ed Just one conditional 2016-01-29 07:30:57 -06:00
Nate Riffe
34478d25da Use an alternate name for the '.' zone
The root zone's domain is `.` but this means something special in the
filesystem which causes an error when creating the zone file.
2016-01-29 07:30:57 -06:00
Nate Riffe
ae3bfa7f1b Add warnings and safety checks and documentation
The changes in the `redhat-default-zones` branch, when released, may cause
upgrade difficulties for Red Hat system administrators. Try to ease the
transition.
2016-01-19 07:44:30 -06:00
Nate Riffe
3bfcc19a3e Turn params into defaults and formalize it
The `params` vs. `bind` class distinction has been blurry for a long time. I'm
formalizing it.

`params` is now `defaults` and its purpose is to gather platform-specific
variation into a single scope. These variables are related to situating a BIND
server on a particular platform and it should not ever be necessary or perhaps
even possible to change them as a matter of preference. Rather, correct values
are function of e.g. `$osfamily` or `$operatingsystem`.

The parameters of the `bind` class are limited to those that control the
server's feature set. These parameters *are* matters of preference and/or
purpose, rather than platform.

Also, I have taken some care to develop a convention for direct references to
qualified parameters where they are re-scoped into the local scope centrally at
the top first, and subsequent references are to the local value. This should
minimize future code churn and also aid readability.
2015-12-26 10:06:24 -06:00
Thomas Sturm
3928c7de6a use modern dnssec key algorithm and provide option to use NSEC3 2015-10-25 15:32:44 +01:00
Nate Riffe
e25dbfc529 Parameterize the random device for dnssec-keygen
`dnssec-keygen` uses `/dev/random` by default, but this is slow in some
scenarios where `/dev/urandom` is both faster and provides sufficient utility.
Allow override via the `bind::random_device` hiera key.
2015-07-03 08:59:59 -05:00
Mike Bryant
1e8d0b3d0d Add support for the update-policy statement 2015-06-11 15:56:01 +01:00
Doug Neal
5b4d9f772e Fix bad variable name in bind::zone parameter validation code 2015-05-18 17:22:32 +01:00
Nate Riffe
9f489dcb6f validate_bool means something else
`validate_bool` validates that the passed value(s) are boolean, not that they
are true. Reformulate the calls to `unless` blocks, and remove the check for
"dynamic implies master" since setting `dynamic` to true is 1) the default and
2) does not cause any change to configuration text or manifest behavior when
the zone is not master.
2015-05-15 07:42:52 -05:00
Nate Riffe
20e50bf43a That needs to be a reload 2015-05-14 16:05:44 -05:00
Nate Riffe
54eea45d7d Refresh managed zones after a zone file change. 2015-05-14 15:36:41 -05:00
Nate Riffe
9f5c4bacb0 Add dynamic parameter to bind::zone
Add a parameter to `bind::zone` which indicates whether a zone is dynamic or
not. This has the effect of allowing puppet to manage the zone file rather than
simply initialize it. This change also introduces more appropriate handling of
slave and stub zones, so that puppet will not populate a stock zone file,
forcing the nameserver to do a zone transfer when a zone is created.

Also, there is now a substancial amount of validation in the `bind::zone` class
in order to prevent invalid parameter combinations, so that validity may be
assumed elsewhere in the manifest and in the configuration template.
2015-05-14 11:14:48 -05:00
Nate Riffe
61adcc07c4 Add support for transfer-source 2015-01-08 08:17:01 -06:00
Nate Riffe
7a74314a1e Make it all work again.
Previous iterations and even a release were all broken. The module works again,
sorry for the interlude.

- Giving up on params and moving to module_data (WIP)
- Change the Package and Service references to the static 'bind' name
- Add a meager amount of test coverage
2015-01-08 08:09:32 -06:00
Nate Riffe
3d1d7a29dc Really fix lint issues 2014-12-12 07:33:00 -06:00
Nate Riffe
ac852d2e5b Lint cleanup 2014-12-11 07:12:19 -06:00
Nate Riffe
2d13b5cf3d Add a source parameter to bind::zone
Enable zone file initialization using a pre-existing zone file.
2014-10-09 16:18:21 -05:00
Nate Riffe
c4bc2a1c4a Add modelines and reformat pp files 2014-06-15 10:08:55 -05:00
Nate Riffe
1f18261b08 Match template expectations for array values 2013-08-08 08:05:27 -05:00
Nate Riffe
a5185b5aaf Fix dnssec-init to respect alt key-directory 2012-10-07 08:23:27 -05:00
Nate Riffe
97ce940f50 Differentiate the key init by namevar 2012-10-06 22:41:14 -05:00
Nate Riffe
9d0f03b5f6 Support alternate key directories 2012-10-06 22:29:54 -05:00
Nate Riffe
26b43b3169 Support forward zones 2012-10-06 15:10:46 -05:00
Nate Riffe
22e0d2c603 Use right parameter name 2012-10-04 19:08:24 -05:00
Nate Riffe
28225f59e9 Add support for zone notification options 2012-10-04 19:04:21 -05:00
Nate Riffe
f30747d10b Add support for DNSSEC signed zones (breaking)
This adds a 'dnssec' parameter to the bind::zone define which causes the module
to generate keys and sign the zone.  Some caveats and breaking changes:

1) Existing non-signed zones will have to be manually moved and signed
2) Signed zones are treated as dynamic
2012-10-04 14:20:15 -05:00
Nate Riffe
64f10b4774 Get file and concat dependencies in order 2012-09-25 23:01:23 -05:00
Nate Riffe
6f170c4e58 Put zone files in the cache dir 2012-09-05 00:11:21 -05:00
Nate Riffe
47c223eadd Fix typo 2012-09-04 22:57:23 -05:00
Nate Riffe
7fb2312a22 Fix syntax 2012-09-04 22:55:15 -05:00
Nate Riffe
d2b830a2e9 Initialize zone files for non-forward zones 2012-09-04 22:53:10 -05:00
Nate Riffe
a4d78368b3 Make zone configs notify the service 2012-09-04 22:43:23 -05:00
Nate Riffe
6ac1a1cefa Avoid naming collision 2012-09-04 12:39:35 -05:00
Nate Riffe
17cb883391 Try this? 2012-09-04 12:29:45 -05:00
Nate Riffe
64f37c1cdf Fix syntax 2012-09-04 12:27:54 -05:00
Nate Riffe
7b53c4c29d Set the file value for zones 2012-09-04 12:23:12 -05:00
Nate Riffe
63b3c4037b Add a zone definition 2012-09-04 07:24:31 -05:00