puppet-sysctl icon indicating copy to clipboard operation
puppet-sysctl copied to clipboard

Prevent multiple spaces in sysctl value

Open mathiasaerts opened this issue 6 years ago • 1 comments

When setting a sysctl value that consists of multiple numbers (like net.ipv4.ip_local_port_range, with a value like 1024 65535), the configured value will be 'enforced' on every puppet run, since the output of sysctl -n will display the output with a tab character instead of a single space.

To prevent the value from being set on every puppet run, I've added a sed command to replace multiple spaces (or tabs) with a single space when comparing the current value.

mathiasaerts avatar Jun 03 '19 16:06 mathiasaerts

Please merge this PR.

nbrys avatar Jul 11 '19 14:07 nbrys