aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-03-09 10:53:49 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-03-09 10:53:49 -0300
commit81979cc2c044aba04a9639b5c8a0911d39070e5f (patch)
tree38c3ce9748fe302293585fe4ed60a73059bd17c0
parent5d5b6a91b5f353d4391b6c99a62c82c24126614d (diff)
downloadpuppet-nodo-81979cc2c044aba04a9639b5c8a0911d39070e5f.tar.gz
puppet-nodo-81979cc2c044aba04a9639b5c8a0911d39070e5f.tar.bz2
Adds order param to nodo::subsystem::sysctl::entry
-rw-r--r--manifests/subsystem/sysctl/entry.pp12
1 files changed, 10 insertions, 2 deletions
diff --git a/manifests/subsystem/sysctl/entry.pp b/manifests/subsystem/sysctl/entry.pp
index ddd6020..93230d5 100644
--- a/manifests/subsystem/sysctl/entry.pp
+++ b/manifests/subsystem/sysctl/entry.pp
@@ -1,9 +1,17 @@
# Simple sysctl definition
define nodo::subsystem::sysctl::entry(
$ensure = present,
+ $order = '',
$value
) {
- file { "/etc/sysctl.d/${name}.conf":
+ if $order != '' {
+ $prefix = "${order}-"
+ }
+ else {
+ $prefix = ''
+ }
+
+ file { "/etc/sysctl.d/${prefix}${name}.conf":
owner => "root",
group => "root",
mode => 0644,
@@ -13,7 +21,7 @@ define nodo::subsystem::sysctl::entry(
exec { "sysctl ${name}=${value}":
user => root,
- subscribe => File["/etc/sysctl.d/${name}.conf"],
+ subscribe => File["/etc/sysctl.d/${prefix}${name}.conf"],
refreshonly => true,
}
}