forked from dsnopek/puppet-serverdensity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_file.pp
60 lines (56 loc) · 1.31 KB
/
config_file.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
# == Class: serverdensity_agent::config_file
#
# Defines the agent config file
#
# === Authors
#
# Server Density <[email protected]>
#
# === Copyright
#
# Copyright 2014 Server Density
#
class serverdensity_agent::config_file (
$api_token,
$provided_agent_key = $::sd_agent_key,
$server_name,
$server_group,
$use_fqdn,
$proxy_host = undef,
$proxy_port = undef,
$proxy_user = undef,
$proxy_password = undef,
$proxy_forbid_method_switch = undef,
$server_name = undef,
$plugin_directory = '',
$log_level = undef,
$collector_log_file = undef,
$forwarder_log_file = undef,
$log_to_syslog = undef,
$syslog_host = undef,
$syslog_port = undef,
) {
$agent_key = agent_key(
$api_token,
$provided_agent_key,
$server_name,
$server_group,
$use_fqdn )
file { '/etc/sd-agent/conf.d':
ensure => 'directory',
mode => '0755',
notify => Class['serverdensity_agent::service'],
}
file { '/etc/sd-agent/config.cfg':
ensure => 'file',
content => template('serverdensity_agent/config.cfg.erb'),
mode => '0644',
notify => Class['serverdensity_agent::service'],
}
# Legacy configurations for V1 plugins
file { '/etc/sd-agent/plugins.d':
ensure => 'directory',
mode => '0755',
notify => Class['serverdensity_agent::service'],
}
}