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
|
# File 'manifests/stub.pp', line 27
define unbound::stub (
Variant[Array[Unbound::Address], Unbound::Address] $address,
Array[Stdlib::Host] $nameservers = [],
# lint:ignore:quoted_booleans
Variant[Boolean, Enum['true', 'false']] $insecure = false,
Variant[Boolean, Enum['true', 'false']] $no_cache = false,
Variant[Boolean, Enum['true', 'false']] $stub_first = false,
# lint:endignore
Unbound::Local_zone_type $type = 'transparent',
Optional[Stdlib::Unixpath] $config_file = undef,
) {
include unbound
$_config_file = pick($config_file, $unbound::config_file)
concat::fragment { "unbound-stub-${name}":
order => '15',
target => $_config_file,
content => template('unbound/stub.erb'),
}
if str2bool($insecure) == true {
concat::fragment { "unbound-stub-${name}-insecure":
order => '01',
target => $_config_file,
content => " domain-insecure: \"${name}\"\n",
}
}
concat::fragment { "unbound-stub-${name}-local-zone":
order => '02',
target => $_config_file,
content => " local-zone: \"${name}\" ${type} \n",
}
}
|