Puppet Class: datadog_agent::integrations::ceph

Inherits:
datadog_agent::params
Defined in:
manifests/integrations/ceph.pp

Overview

Sample Usage:

class { 'datadog_agent::integrations::ceph' :
}

Parameters:

  • tags (Array) (defaults to: ['name:ceph_cluster'])
  • ceph_cmd (String) (defaults to: '/usr/bin/ceph')


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'manifests/integrations/ceph.pp', line 19

class datadog_agent::integrations::ceph (
  Array $tags = ['name:ceph_cluster'],
  String $ceph_cmd = '/usr/bin/ceph',
) inherits datadog_agent::params {
  require datadog_agent

  file { '/etc/sudoers.d/datadog_ceph':
    content => "# This file is required for dd ceph \ndd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph\n",
  }

  $dst_dir = "${datadog_agent::params::conf_dir}/ceph.d"

  file { $dst_dir:
    ensure  => directory,
    owner   => $datadog_agent::dd_user,
    group   => $datadog_agent::params::dd_group,
    mode    => $datadog_agent::params::permissions_directory,
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
  $dst = "${dst_dir}/conf.yaml"

  file { $dst:
    ensure  => file,
    owner   => $datadog_agent::dd_user,
    group   => $datadog_agent::params::dd_group,
    mode    => $datadog_agent::params::permissions_protected_file,
    content => template('datadog_agent/agent-conf.d/ceph.yaml.erb'),
    require => Package[$datadog_agent::params::package_name],
    notify  => Service[$datadog_agent::params::service_name],
  }
}