aboutsummaryrefslogtreecommitdiff
path: root/manifests/defines
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-06-02 21:43:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-06-02 21:43:51 -0300
commita564290bbe9b9bc78bd9d017e2a047f89bd3bb34 (patch)
tree3371096e01daebca45159c6971ecaabb615c5f01 /manifests/defines
parentd3e11f88f27609ca199bf1263348a466e909ff78 (diff)
downloadpuppet-nodo-a564290bbe9b9bc78bd9d017e2a047f89bd3bb34.tar.gz
puppet-nodo-a564290bbe9b9bc78bd9d017e2a047f89bd3bb34.tar.bz2
Adding sysctl definition
Diffstat (limited to 'manifests/defines')
-rw-r--r--manifests/defines/sysctl.pp19
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/defines/sysctl.pp b/manifests/defines/sysctl.pp
new file mode 100644
index 0000000..06f6a14
--- /dev/null
+++ b/manifests/defines/sysctl.pp
@@ -0,0 +1,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,
+ }
+}