aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/tuned.pp
blob: 48951bdf50be0f87dce5c63bdc7c6731ae3c516b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# == Class: tripleo::profile::base::tuned
#
# Configures tuned service.
#
# === Parameters:
#
# [*profile*]
#   (optional) tuned active profile.
#   Defaults to 'throughput-performance'
#
#
class tripleo::profile::base::tuned (
  $profile = 'throughput-performance'
) {
  ensure_resource('package', 'tuned', { ensure => 'present' })
  exec { 'tuned-adm':
    path    => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
    command => "tuned-adm profile ${profile}",
    unless  => "tuned-adm active | grep -q '${profile}'",
    require => Package['tuned'],
  }
}