forked from thias/puppet-bind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
10 changed files
with
70 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
--- | ||
bind::params::supported: false | ||
bind::defaults::supported: false | ||
bind::defaults::random_device: '/dev/random' | ||
bind::defaults::rndc: true | ||
|
||
bind::forwarders: '' | ||
bind::dnssec: true | ||
bind::version: '' | ||
bind::random_device: '/dev/random' | ||
bind::include_local: false | ||
|
||
bind::updater::keydir: '/etc/nsupdate-keys' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
--- | ||
bind::params::supported: true | ||
bind::params::bind_user: 'bind' | ||
bind::params::bind_group: 'bind' | ||
bind::params::bind_package: 'bind9' | ||
bind::params::bind_service: 'bind9' | ||
bind::params::nsupdate_package: 'dnsutils' | ||
bind::params::confdir: '/etc/bind' | ||
bind::namedconf: '/etc/bind/named.conf' | ||
bind::cachedir: '/var/cache/bind' | ||
bind::rndc: true | ||
bind::defaults::supported: true | ||
bind::defaults::bind_user: 'bind' | ||
bind::defaults::bind_group: 'bind' | ||
bind::defaults::bind_package: 'bind9' | ||
bind::defaults::bind_service: 'bind9' | ||
bind::defaults::nsupdate_package: 'dnsutils' | ||
bind::defaults::confdir: '/etc/bind' | ||
bind::defaults::namedconf: '/etc/bind/named.conf' | ||
bind::defaults::cachedir: '/var/cache/bind' | ||
|
||
bind::updater::keydir: '/etc/bind/keys' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
--- | ||
bind::params::supported: true | ||
bind::params::bind_user: 'named' | ||
bind::params::bind_group: 'named' | ||
bind::params::bind_package: 'bind' | ||
bind::params::bind_service: 'named' | ||
bind::params::nsupdate_package: 'bind-utils' | ||
bind::params::managed_keys_directory: '/var/named/dynamic' | ||
bind::params::confdir: '/etc/named' | ||
bind::namedconf: '/etc/named.conf' | ||
bind::cachedir: '/var/named' | ||
bind::rndc: true | ||
bind::defaults::supported: true | ||
bind::defaults::bind_user: 'named' | ||
bind::defaults::bind_group: 'named' | ||
bind::defaults::bind_package: 'bind' | ||
bind::defaults::bind_service: 'named' | ||
bind::defaults::nsupdate_package: 'bind-utils' | ||
bind::defaults::managed_keys_directory: '/var/named/dynamic' | ||
bind::defaults::confdir: '/etc/named' | ||
bind::defaults::namedconf: '/etc/named.conf' | ||
bind::defaults::cachedir: '/var/named' | ||
|
||
bind::updater::keydir: '/etc/named/keys' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# ex: syntax=puppet si ts=4 sw=4 et | ||
|
||
class bind::defaults ( | ||
$supported = undef, | ||
$confdir = undef, | ||
$namedconf = undef, | ||
$cachedir = undef, | ||
$random_device = undef, | ||
$bind_user = undef, | ||
$bind_group = undef, | ||
$bind_package = undef, | ||
$bind_service = undef, | ||
$nsupdate_package = undef, | ||
$managed_keys_directory = undef, | ||
) { | ||
unless $supported { | ||
fail('Platform is not supported') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
bind::params::confdir: '_CONFDIR_' | ||
bind::namedconf: '_NAMEDCONF_' | ||
bind::defaults::confdir: '_CONFDIR_' | ||
bind::defaults::namedconf: '_NAMEDCONF_' |