thias / puppet-sysctl

Puppet module to manage sysctl parameters
Other
35 stars 86 forks source link

enforce check is failed when value is multi fields #57

Open zenglhua opened 7 years ago

zenglhua commented 7 years ago

For examples:

net.ipv4.tcp_wmem=4096 65536 16777216 net.ipv4.tcp_rmem=4096 87380 16777216

tpdownes commented 7 years ago

@zenglhua I resolved this in

https://forge.puppet.com/tpdownes/sysctl

You just have to follow the docs and use single spaces between the fields.

gorantornqvist commented 7 years ago

But that module doesnt work with Puppet 3.8 right?

tpdownes commented 7 years ago

No. Deliberately not so. You might choose it for inspiration. But... I've decided to adopt

https://forge.puppet.com/herculesteam/augeasproviders_sysctl

which claims Puppet 3.x compatibility. Then I build a really simple profile around it. You'd need to remove the Puppet 4 parameter type enforcement. I've found it to be basically drop-in.

class profile::sysctl(
  Hash $values = undef) {

  create_resources('sysctl', $values)

}