Import rest of modules.
This commit is contained in:
parent
02fa10f33c
commit
3f225ced9b
39 changed files with 2056 additions and 0 deletions
31
sysctl/manifests/init.pp
Normal file
31
sysctl/manifests/init.pp
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
# Set sysctl value
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# $name:
|
||||
# Sysctl key to set.
|
||||
# $value:
|
||||
# Value for given key.
|
||||
#
|
||||
# === Sample usage
|
||||
#
|
||||
# sysctl { "vm.swappinesss":
|
||||
# value => "100",
|
||||
# }
|
||||
#
|
||||
define sysctl::set($value) {
|
||||
|
||||
exec { "sysctl-${name}":
|
||||
command => "sysctl -w ${name}='${value}'",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
unless => "sysctl -n ${name} | egrep '^${value}'",
|
||||
}
|
||||
|
||||
exec { "sysctl-${name}-save":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
command => "echo '${name}=${value}' >> /etc/sysctl.conf",
|
||||
unless => "egrep '^${name}=' /etc/sysctl.conf",
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue