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
|
# File 'manifests/params.pp', line 1
class statsd::params($node_module_dir = '') {
case $::osfamily {
'RedHat': {
$init_script = 'puppet:///modules/statsd/statsd-init-rhel'
if ! $node_module_dir {
$statsjs = '/usr/lib/node_modules/statsd/stats.js'
}
else {
$statsjs = "${node_module_dir}/statsd/stats.js"
}
}
'Debian': {
$init_script = 'puppet:///modules/statsd/statsd-init'
if ! $node_module_dir {
case $provider {
'apt': {
$statsjs = '/usr/share/statsd/stats.js'
}
'npm': {
$statsjs = '/usr/lib/node_modules/statsd/stats.js'
}
default: {
fail('Unsupported provider')
}
}
}
else {
$statsjs = "${node_module_dir}/statsd/stats.js"
}
}
default: {
fail('Unsupported OS Family')
}
}
}
|