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
51
52
53
54
55
|
# File 'manifests/params.pp', line 1
class tuned::params {
$enabled = true
$packages = ['tuned']
$sleep_interval = 1
$update_interval = 10
if $::tuned_version and $::tuned_version =~ /^(\d+)\.[\d\.]+$/ {
$_majversion = $1
}
case $::operatingsystem {
'Fedora': {
$majversion = pick($_majversion, '2')
$dynamic_tuning = true
$main_conf = '/etc/tuned/tuned-main.conf'
$services = ['tuned']
$profile = '' #autodetect
$profiles_path = '/etc/tuned'
$active_profile_conf = 'active_profile'
}
'RedHat','CentOS','Scientific','OracleLinux': {
case $::operatingsystemmajrelease {
'6': {
$majversion = pick($_majversion, '0')
$dynamic_tuning = false
$main_conf = '' # unsupported
$services = ['tuned', 'ktune']
$profile = 'default'
$profiles_path = '/etc/tune-profiles'
$active_profile_conf = 'active-profile'
}
'7': {
$majversion = pick($_majversion, '2')
$dynamic_tuning = false
$main_conf = '/etc/tuned/tuned-main.conf'
$services = ['tuned']
$profile = '' #autodetect
$profiles_path = '/etc/tuned'
$active_profile_conf = 'active_profile'
}
default: {
fail("Unsupported OS release: \
${::operatingsystem} ${::operatingsystemmajrelease}")
}
}
}
default: {
fail("Unsupported OS: ${::operatingsystem}")
}
}
}
|