diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-03-09 10:53:49 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-03-09 10:53:49 -0300 |
commit | 81979cc2c044aba04a9639b5c8a0911d39070e5f (patch) | |
tree | 38c3ce9748fe302293585fe4ed60a73059bd17c0 /manifests/subsystem/sysctl | |
parent | 5d5b6a91b5f353d4391b6c99a62c82c24126614d (diff) | |
download | puppet-nodo-81979cc2c044aba04a9639b5c8a0911d39070e5f.tar.gz puppet-nodo-81979cc2c044aba04a9639b5c8a0911d39070e5f.tar.bz2 |
Adds order param to nodo::subsystem::sysctl::entry
Diffstat (limited to 'manifests/subsystem/sysctl')
-rw-r--r-- | manifests/subsystem/sysctl/entry.pp | 12 |
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, } } |