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
113
114
115
116
117
118
119
120
121
122
|
# File 'manifests/audisp.pp', line 56
class auditd::audisp (
Stdlib::Absolutepath $dir = '/etc/audisp',
Stdlib::Filemode $mode = '0750',
Variant[String[1], Integer] $owner = 0,
Variant[String[1], Integer] $group = 0,
Auditd::Audisp::Conf $config = {},
Stdlib::Absolutepath $config_path = '/etc/audisp/audispd.conf',
Stdlib::Filemode $config_mode = '0600',
Variant[String[1], Integer] $config_owner = 0,
Variant[String[1], Integer] $config_group = 0,
String[1] $package_name = 'audispd-plugins',
String $package_ensure = 'installed',
Boolean $package_manage = true,
Stdlib::Absolutepath $plugin_dir = '/etc/audisp/plugins.d',
Stdlib::Filemode $plugin_dir_mode = '0750',
Variant[String[1], Integer] $plugin_dir_owner = 0,
Variant[String[1], Integer] $plugin_dir_group = 0,
Hash[String, Auditd::Plugins] $plugins = {},
) inherits auditd {
if $package_manage {
package { $package_name:
ensure => $package_ensure,
}
}
if $dir != $auditd::dir {
file { $dir:
ensure => directory,
owner => $owner,
group => $group,
mode => $mode,
}
}
if $plugin_dir != $auditd::plugin_dir {
file { $plugin_dir:
ensure => directory,
owner => $plugin_dir_owner,
group => $plugin_dir_group,
mode => $plugin_dir_mode,
}
}
if $config_path != $auditd::config_path {
file { $config_path:
ensure => file,
owner => $config_owner,
group => $config_group,
mode => $config_mode,
content => epp('auditd/audisp.conf.epp', {
config => $config,
}),
}
}
file { '/sbin/audispd':
ensure => file,
mode => '0750',
}
$plugins.each |$name, $parameters| {
auditd::plugin { $name:
* => $parameters,
plugin_type => 'audisp',
}
}
}
|