forked from theforeman/puppet-dns
/
init.pp
110 lines (109 loc) · 5.25 KB
/
init.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# == Class: dns
#
# Install, configure and start dns service
#
# === Parameters:
# $namedconf_path:: Path of the named config
#
# $dnsdir:: Directory holding the named configs
#
# $dns_server_package:: Name of the package to install
#
# $rndckeypath:: Path of the RNDC key
#
# $optionspath:: Path of the named options
#
# $publicviewpath:: Path of the config file holding all the zones
#
# $vardir:: Directory holding the variable or working files
#
# $namedservicename:: Name of the service
#
# $zonefilepath:: Directory containing zone files
#
# $localzonepath:: File holding local zones like RFC1912 or RFC1918 files.
#
# $forward:: The forward option
#
# $forwarders:: The forwarders option
#
# $listen_on_v6:: The listen-on-v6 option
#
# $recursion:: The recursion option
#
# $allow_recursion:: The allow-recursion option
#
# $allow_query:: The allow-query option
#
# $empty_zones_enable:: The empty-zones-enable option
#
# $dns_notify:: The notify option in named.conf
#
# $dnssec_enable:: The dnssec-enable option
#
# $dnssec_validation:: The dnssec-validation option
#
# $namedconf_template:: The template to be used for named.conf
#
# $acls:: Specify a hash of ACLs. Each key is the
# name of a network, and its value is
# an array of subnet strings.
#
# $optionsconf_template:: The template to be used for options.conf
#
# $controls:: Specify a hash of controls. Each key is the
# name of a network, and its value is a hash
# containing 'port' => integer, 'keys' => array
# and 'allowed_addresses' => array
#
# $service_ensure:: The ensure attribute on the service
#
# $service_enable:: Whether to enable the service (start at boot)
#
# $additional_options:: Additional options
#
# $additional_directives:: Additional directives. These are free form
# strings that allow for full customization. Use
# with caution.
#
# === Usage:
#
# * Simple usage:
#
# include dns
#
class dns (
Stdlib::Absolutepath $namedconf_path = $::dns::params::namedconf_path,
Stdlib::Absolutepath $dnsdir = $::dns::params::dnsdir,
String $dns_server_package = $::dns::params::dns_server_package,
Stdlib::Absolutepath $rndckeypath = $::dns::params::rndckeypath,
Stdlib::Absolutepath $optionspath = $::dns::params::optionspath,
Stdlib::Absolutepath $publicviewpath = $::dns::params::publicviewpath,
Stdlib::Absolutepath $vardir = $::dns::params::vardir,
String $namedservicename = $::dns::params::namedservicename,
Stdlib::Absolutepath $zonefilepath = $::dns::params::zonefilepath,
Optional[Stdlib::Absolutepath] $localzonepath = $::dns::params::localzonepath,
Optional[Enum['only', 'first']] $forward = $::dns::params::forward,
Array[String] $forwarders = $::dns::params::forwarders,
Optional[Variant[String, Boolean]] $listen_on_v6 = $::dns::params::listen_on_v6,
Enum['yes', 'no'] $recursion = $::dns::params::recursion,
Array[String] $allow_recursion = $::dns::params::allow_recursion,
Array[String] $allow_query = $::dns::params::allow_query,
Enum[yes, no] $empty_zones_enable = $::dns::params::empty_zones_enable,
Optional[Enum['yes', 'no', 'explicit']] $dns_notify = $::dns::params::dns_notify,
Enum['yes', 'no'] $dnssec_enable = $::dns::params::dnssec_enable,
Enum['yes', 'no', 'auto'] $dnssec_validation = $::dns::params::dnssec_validation,
String $namedconf_template = $::dns::params::namedconf_template,
Hash[String, Array[String]] $acls = $::dns::params::acls,
String $optionsconf_template = $::dns::params::optionsconf_template,
Hash[String, Hash[String, Data]] $controls = $::dns::params::controls,
Variant[Enum['running', 'stopped'], Boolean] $service_ensure = $::dns::params::service_ensure,
Boolean $service_enable = $::dns::params::service_enable,
Hash[String, Data] $additional_options = $::dns::params::additional_options,
Array[String] $additional_directives = $::dns::params::additional_directives,
) inherits dns::params {
class { '::dns::install': }
~> class { '::dns::config': }
~> class { '::dns::service': }
~> Class['dns']
}