aboutsummaryrefslogtreecommitdiff
path: root/manifests/defines/sysctl.pp
blob: 06f6a1452390accb71cfa0825c56dbf85086d1e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Simple sysctl definition
define sysctl(
  $ensure = present,
  $value
) {
  file { "/etc/sysctl.d/${name}.conf":
    owner   => "root",
    group   => "root",
    mode    => 0644,
    ensure  => $ensure,
    content => "$name = $value\n",
  }

  exec { "sysctl ${name}=${value}":
    user        => root,
    subscribe   => File["/etc/sysctl.d/${name}.conf"],
    refreshonly => true,
  }
}