Puppet Class: ci_agent::integrations::haproxy

Inherits:
ci_agent::params
Defined in:
manifests/integrations/haproxy.pp

Overview

Class: ci_agent::integrations::haproxy

This class will install the necessary configuration for the haproxy integration

Parameters:

$url:
  The URL for haproxy

Sample Usage:

class { 'ci_agent::integrations::haproxy' :
  url   => 'http://localhost:8080',
  creds => { username => 'admin',
             password => 'password',
           },
}

Parameters:

  • creds (Any) (defaults to: {})
  • url (Any) (defaults to: "http://${::ipaddress}:8080")


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/integrations/haproxy.pp', line 18

class ci_agent::integrations::haproxy(
  $creds = {},
  $url   = "http://${::ipaddress}:8080",
) inherits ci_agent::params {

  file {
    "${ci_agent::params::conf_dir}/haproxy.yaml":
      ensure  => file,
      owner   => $ci_agent::params::oneapm_ci_user,
      group   => $ci_agent::params::oneapm_ci_group,
      mode    => '0644',
      content => template('ci_agent/agent-conf.d/haproxy.yaml.erb'),
      require => Package[$ci_agent::params::package_name],
      notify  => Service[$ci_agent::params::service_name]
  }
}