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
|
# File 'manifests/init.pp', line 1
class dnsmasq(
$configs_hash = {},
$hosts_hash = {},
$dhcp_hosts_hash = {},
$package_ensure = 'installed',
$service_control = true,
$purge_config_dir = false,
) {
include ::dnsmasq::params
validate_hash($configs_hash)
validate_hash($hosts_hash)
validate_hash($dhcp_hosts_hash)
anchor { '::dnsmasq::start': }
class { '::dnsmasq::install': require => Anchor['::dnsmasq::start'], }
class { '::dnsmasq::config': require => Class['::dnsmasq::install'], }
class { '::dnsmasq::service':
service_control => $service_control,
subscribe => Class['::dnsmasq::install', '::dnsmasq::config'],
}
class { '::dnsmasq::reload':
require => Class['::dnsmasq::service'],
}
anchor { '::dnsmasq::end': require => Class['::dnsmasq::service'], }
if $::settings::storeconfigs {
File_line <<| tag == 'dnsmasq-host' |>>
}
create_resources(dnsmasq::conf, $configs_hash)
create_resources(dnsmasq::host, $hosts_hash)
create_resources(dnsmasq::dhcp_host, $dhcp_hosts_hash)
}
|