aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/sysctl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-11 21:16:42 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-11 21:16:42 -0300
commit76ec4642be1a8bc64380c077a5890c4d0f4243e0 (patch)
treee31930271b7eefb3c3d693264e012e8ff45832ae /manifests/subsystem/sysctl
parent6509060a791daeeee13c40f9367489ac5e00880e (diff)
downloadpuppet-nodo-76ec4642be1a8bc64380c077a5890c4d0f4243e0.tar.gz
puppet-nodo-76ec4642be1a8bc64380c077a5890c4d0f4243e0.tar.bz2
Autoload definitions
Diffstat (limited to 'manifests/subsystem/sysctl')
-rw-r--r--manifests/subsystem/sysctl/entry.pp19
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/subsystem/sysctl/entry.pp b/manifests/subsystem/sysctl/entry.pp
new file mode 100644
index 0000000..ddd6020
--- /dev/null
+++ b/manifests/subsystem/sysctl/entry.pp
@@ -0,0 +1,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,
+ }
+}