Puppet Class: dynatrace::role::apache_wsagent

Inherits:
dynatrace
Defined in:
manifests/role/apache_wsagent.pp

Overview

apache_wsagent

Parameters:

  • ensure (Any) (defaults to: 'present')
  • role_name (Any) (defaults to: 'Dynatrace Apache WebServer Agent')
  • apache_config_file_path (Any) (defaults to: $dynatrace::apache_wsagent_apache_config_file_path)


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'manifests/role/apache_wsagent.pp', line 2

class dynatrace::role::apache_wsagent (
  $ensure                  = 'present',
  $role_name               = 'Dynatrace Apache WebServer Agent',
  $apache_config_file_path = $dynatrace::apache_wsagent_apache_config_file_path
) inherits dynatrace {

  validate_re($ensure, ['^present$', '^absent$'])
  validate_string($apache_config_file_path)

  case $::kernel {
    'Linux': {
      $agent_path = $dynatrace::apache_wsagent_linux_agent_path
    }
    default: {}
  }

  file_line { "Inject the ${role_name} into Apache HTTPD's config file":
    ensure => $ensure,
    path   => $apache_config_file_path,
    line   => "LoadModule dtagent_module \"${agent_path}\"",
    match  => '^LoadModule\ dtagent_module .+'
  }
}