fuel-plugin-dynatrace/deployment_scripts/puppet/modules/dynatrace/manifests/oneagent.pp
2016-11-09 12:48:19 +01:00

25 lines
633 B
Puppet

class dynatrace::oneagent {
$file = "/tmp/Dynatrace-OneAgent.sh"
if ($dynatrace::managed) {
$url = "https://${dynatrace::server}/e/${dynatrace::tenant}/installer/agent/unix/latest/${dynatrace::token}/${dynatrace::tenant}"
}
else {
$url = "https://${dynatrace::tenant}.live.dynatrace.com/installer/agent/unix/latest/${dynatrace::token}"
}
file { '/etc/hiera/plugins/dynatrace.yaml':
ensure => file,
} ->
download {'Download Dynatrace OneAgent':
uri => $url,
dest => $file
} ->
exec { 'install_oneagent':
command => "/bin/sh ${file} APP_LOG_CONTENT_ACCESS=1",
path => $::path
}
}