From 81979cc2c044aba04a9639b5c8a0911d39070e5f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 9 Mar 2017 10:53:49 -0300 Subject: Adds order param to nodo::subsystem::sysctl::entry --- manifests/subsystem/sysctl/entry.pp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'manifests/subsystem/sysctl') 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, } } -- cgit v1.2.3