-
Notifications
You must be signed in to change notification settings - Fork 258
/
mysql.pp
50 lines (48 loc) · 1.07 KB
/
mysql.pp
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
45
46
47
48
49
50
# Class: datadog::integrations::mysql
#
# This class will install the necessary configuration for the mysql integration
#
# Parameters:
# $host:
# The host mysql is running on
# $password
# The mysql password for the datadog user
# $user
# The mysql user for the datadog user
# $tags
# Optional array of tags
# $replication
# replication option
# $galera_cluster
# galera cluster option
#
# Sample Usage:
#
# class { 'datadog::integrations::mysql' :
# host => 'localhost',
# password => 'some_pass',
# user => 'datadog'
# }
#
#
class datadog::integrations::mysql(
$host,
$password,
$user = 'datadog',
$tags = [],
$replication = '0',
$galera_cluster = '0'
) inherits datadog::params {
package { $mysql_int_package :
ensure => installed,
}
file { "${conf_dir}/mysql.yaml":
ensure => file,
owner => $dd_user,
group => $dd_group,
mode => 0644,
content => template('datadog/mysql.yaml.erb'),
require => Package[$mysql_int_package],
notify => Service[$service_name]
}
}