Puppet Class: dynatrace::role::pwh_connection

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

Overview

pwh_connection

Parameters:

  • ensure (Any) (defaults to: 'present')
  • role_name (Any) (defaults to: 'Dynatrace Server PWH connection')
  • collector_port (Any) (defaults to: $dynatrace::server_collector_port)
  • pwh_connection_hostname (Any) (defaults to: $dynatrace::server_pwh_connection_hostname)
  • pwh_connection_port (Any) (defaults to: $dynatrace::server_pwh_connection_port)
  • pwh_connection_dbms (Any) (defaults to: $dynatrace::server_pwh_connection_dbms)
  • pwh_connection_database (Any) (defaults to: $dynatrace::server_pwh_connection_database)
  • pwh_connection_username (Any) (defaults to: $dynatrace::server_pwh_connection_username)
  • pwh_connection_password (Any) (defaults to: $dynatrace::server_pwh_connection_password)


2
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
# File 'manifests/role/pwh_connection.pp', line 2

class dynatrace::role::pwh_connection (
  $ensure                  = 'present',
  $role_name               = 'Dynatrace Server PWH connection',
  $collector_port          = $dynatrace::server_collector_port,
  $pwh_connection_hostname = $dynatrace::server_pwh_connection_hostname,
  $pwh_connection_port     = $dynatrace::server_pwh_connection_port,
  $pwh_connection_dbms     = $dynatrace::server_pwh_connection_dbms,
  $pwh_connection_database = $dynatrace::server_pwh_connection_database,
  $pwh_connection_username = $dynatrace::server_pwh_connection_username,
  $pwh_connection_password = $dynatrace::server_pwh_connection_password,
) inherits dynatrace {

  validate_re($ensure, ['^present$', '^absent$'])
  validate_string($collector_port)
  validate_string($pwh_connection_hostname, $pwh_connection_port, $pwh_connection_dbms, $pwh_connection_database, $pwh_connection_username, $pwh_connection_password)

  case $::kernel {
    'Linux': {
      $service = $dynatrace::dynaTraceServer
    }
    default: {}
  }

  wait_until_rest_endpoint_is_ready { 'https://localhost:8021/rest/management/pwhconnection/config':
    ensure  => $ensure,
    require => Service["Start and enable the Dynatrace Server's service: '${service}'"]
  }

  configure_pwh_connection { $pwh_connection_dbms:
    ensure   => $ensure,
    hostname => $pwh_connection_hostname,
    port     => $pwh_connection_port,
    database => $pwh_connection_database,
    username => $pwh_connection_username,
    password => $pwh_connection_password,
    require  => [ Service["Start and enable the Dynatrace Server's service: '${service}'"], Wait_until_rest_endpoint_is_ready['https://localhost:8021/rest/management/pwhconnection/config'] ]
  }
}