Puppet Class: dynatraceappmon::role::apache_wsagent

Inherits:
dynatraceappmon
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: $dynatraceappmon::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 dynatraceappmon::role::apache_wsagent (
  $ensure                  = 'present',
  $role_name               = 'Dynatrace Apache WebServer Agent',
  $apache_config_file_path = $dynatraceappmon::apache_wsagent_apache_config_file_path
) inherits dynatraceappmon {

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

  case $::kernel {
    'Linux': {
      $agent_path = $dynatraceappmon::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 .+'
  }
}