aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/sysctl/entry.pp
blob: ddd602034687e1691b3a11767f278797b635a17f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Simple sysctl definition
define nodo::subsystem::sysctl::entry(
  $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,
  }
}