-
Notifications
You must be signed in to change notification settings - Fork 259
Expand file tree
/
Copy pathmemcache.pp
More file actions
44 lines (42 loc) · 1.16 KB
/
memcache.pp
File metadata and controls
44 lines (42 loc) · 1.16 KB
1
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
40
41
42
43
44
# Class: datadog_agent::integrations::memcache
#
# This class will install the necessary configuration for the memcache integration
#
# Parameters:
# $url:
# url used to connect to the memcached instance
# $port:
# $tags
# Optional array of tags
#
# Sample Usage:
#
# include 'datadog_agent::integrations::memcache'
#
# OR
#
# class { 'datadog_agent::integrations::memcache':
# url => 'localhost',
# }
#
class datadog_agent::integrations::memcache (
$url = 'localhost',
$port = 11211,
$tags = [],
$items = false,
$slabs = false,
) inherits datadog_agent::params {
include datadog_agent
validate_string($url)
validate_array($tags)
validate_integer($port)
file { "${datadog_agent::params::conf_dir}/mcache.yaml":
ensure => file,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0600',
content => template('datadog_agent/agent-conf.d/mcache.yaml.erb'),
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
}