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
|
# File 'manifests/config.pp', line 24
class instana_agent::config {
require instana_agent::required_config
$dir = '/opt/instana/agent/etc/instana/'
if ($instana_agent::instana_agent_flavor != 'static' and
$instana_agent::instana_agent_update_enabled) {
$update_string = 'AUTO'
} else {
$update_string = 'OFF'
}
file { "${$dir}configuration.yaml":
ensure => 'file',
content => epp('instana_agent/agent_configuration.epp', {
'tags' => $instana_agent::instana_agent_tags,
'zone' => $instana_agent::instana_agent_zone,
}),
group => 'root',
mode => '0640',
owner => 'root',
}
file_line { 'ensure agent mode':
ensure => present,
match => '^mode\=',
path => "${$dir}com.instana.agent.main.config.Agent.cfg",
line => "mode=${upcase($instana_agent::instana_agent_mode)}",
notify => Service['instana-agent'],
}
file { "${$dir}com.instana.agent.main.config.UpdateManager.cfg":
ensure => 'file',
content => epp('instana_agent/agent_updates.epp', {
'update_enabled' => $update_string,
'update_interval' => $instana_agent::instana_agent_update_interval,
'update_time' => $instana_agent::instana_agent_update_time,
}),
group => 'root',
mode => '0640',
owner => 'root',
}
file { "${$dir}com.instana.agent.bootstrap.AgentBootstrap.cfg":
ensure => 'file',
content => epp('instana_agent/agent_sensorpin.epp', {
'version' => $instana_agent::instana_agent_update_pin
}),
group => 'root',
mode => '0640',
owner => 'root',
}
}
|