Puppet Class: cloudinsight_agent::integrations::zk

Inherits:
cloudinsight_agent::params
Defined in:
manifests/integrations/zk.pp

Overview

Class: cloudinsight_agent::integrations::zk

This class will install the necessary configuration for the zk integration

Parameters:

$host:
    The host zk is running on. Defaults to '127.0.0.1'
$port
    The zk password for the cloudinsight user. Defaults to 27017
$tags
    Optional array of tags

Sample Usage:

class { 'cloudinsight_agent::integrations::zk' :
  servers => [
    {
      'host' => 'localhost',
      'port' => '2181',
      'tags' => [],
    },
    {
      'host' => 'localhost',
      'port' => '2182',
      'tags' => [],
    },
  ]
}

Parameters:

  • servers (Any) (defaults to: [{'host' => 'localhost', 'port' => '2181'}])


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/integrations/zk.pp', line 30

class cloudinsight_agent::integrations::zk (
  $servers = [{'host' => 'localhost', 'port' => '2181'}]
) inherits cloudinsight_agent::params {

  validate_array($servers)

  file { "${cloudinsight_agent::params::conf_dir}/zk.yaml":
    ensure  => file,
    owner   => $cloudinsight_agent::params::cloudinsight_user,
    group   => $cloudinsight_agent::params::cloudinsight_group,
    mode    => '0600',
    content => template('cloudinsight_agent/agent-conf.d/zk.yaml.erb'),
    require => Package[$cloudinsight_agent::params::package_name],
    notify  => Service[$cloudinsight_agent::params::service_name]
  }
}