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
111
112
|
# File 'manifests/init.pp', line 3
class puppet (
$package_ensure = 'present',
$package_name = $::puppet::params::package_name,
$package_list = $::puppet::params::package_list,
$config_dir_path = $::puppet::params::config_dir_path,
$config_dir_purge = false,
$config_dir_recurse = true,
$config_dir_source = undef,
$config_file_path = $::puppet::params::config_file_path,
$config_file_owner = $::puppet::params::config_file_owner,
$config_file_group = $::puppet::params::config_file_group,
$config_file_mode = $::puppet::params::config_file_mode,
$config_file_source = undef,
$config_file_string = undef,
$config_file_template = undef,
$config_file_notify = $::puppet::params::config_file_notify,
$config_file_require = $::puppet::params::config_file_require,
$config_file_hash = {},
$config_file_options_hash = {},
$service_ensure = 'running',
$service_name = $::puppet::params::service_name,
$service_enable = true,
$main_etckeeper = false,
$agent_environment = 'production',
$agent_listen = false,
$agent_pluginsync = true,
$agent_puppetdlog = true,
$agent_report = true,
$agent_server = "puppet.${::domain}",
$master_autosign = false,
$master_environmentpath = '$confdir/environments',
$master_puppetdlog = true,
$master_reports = ['store'],
$master_storeconfigs = undef,
$master_strict_variables = false,
$master_stringify_facts = true,
$server_mode = undef,
) inherits ::puppet::params {
validate_re($package_ensure, '^(absent|latest|present|purged)$')
validate_string($package_name)
if $package_list { validate_array($package_list) }
validate_absolute_path($config_dir_path)
validate_bool($config_dir_purge)
validate_bool($config_dir_recurse)
if $config_dir_source { validate_string($config_dir_source) }
validate_absolute_path($config_file_path)
validate_string($config_file_owner)
validate_string($config_file_group)
validate_string($config_file_mode)
if $config_file_source { validate_string($config_file_source) }
if $config_file_string { validate_string($config_file_string) }
if $config_file_template { validate_string($config_file_template) }
validate_string($config_file_notify)
validate_string($config_file_require)
validate_hash($config_file_hash)
validate_hash($config_file_options_hash)
validate_re($service_ensure, '^(running|stopped)$')
validate_string($service_name)
validate_bool($service_enable)
$config_file_content = default_content($config_file_string, $config_file_template)
if $config_file_hash {
create_resources('puppet::define', $config_file_hash)
}
if $package_ensure == 'absent' {
$config_dir_ensure = 'directory'
$config_file_ensure = 'present'
$_service_ensure = 'stopped'
$_service_enable = false
} elsif $package_ensure == 'purged' {
$config_dir_ensure = 'absent'
$config_file_ensure = 'absent'
$_service_ensure = 'stopped'
$_service_enable = false
} else {
$config_dir_ensure = 'directory'
$config_file_ensure = 'present'
$_service_ensure = $service_ensure
$_service_enable = $service_enable
}
validate_re($config_dir_ensure, '^(absent|directory)$')
validate_re($config_file_ensure, '^(absent|present)$')
if $server_mode {
class { '::puppet::master': }
}
anchor { 'puppet::begin': } ->
class { '::puppet::install': } ->
class { '::puppet::config': } ~>
class { '::puppet::service': } ->
anchor { 'puppet::end': }
}
|