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
|
# File 'manifests/agent/config/jboss.pp', line 3
class appdynamics::agent::config::jboss
(
$agent_enable,
$agent_base,
$agent_home,
$group,
$user,
$app,
$tier,
$controller_host,
$controller_port,
$controller_ssl_enabled,
$enable_orchestration,
$account_name,
$account_access_key,
$force_agent_registration,
$node_name,
$agent_options,
$application_home,
)
{
$agent_runtime_directory = "${agent_base}/${agent_home}"
file { $agent_home:
ensure => directory,
path => $agent_runtime_directory,
group => $group,
owner => $user,
mode => '0755',
require => Class['appdynamics::agent::install'],
} ->
exec { 'copy_java_agent_jboss':
path => '/bin:/usr/bin',
command => "cp -ar ${appdynamics::agent::java_agent_install_dir}/* ${agent_runtime_directory}/",
onlyif => "test $(find ${agent_runtime_directory} -type f | wc -l) -eq 0",
} ->
file { 'jboss_controller-info_xml':
path => "${agent_runtime_directory}/conf/controller-info.xml",
content => template('appdynamics/agent/jboss/controller-info_xml.erb'),
group => $group,
owner => $user,
mode => '0644',
} ->
file { 'jboss_run_conf':
path => "${application_home}/bin/run.conf",
content => template('appdynamics/agent/jboss/run_conf.erb'),
group => $group,
owner => $user,
mode => '0644',
notify => Service['appdynamics-jboss'],
}
}
|