You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At https://github.com/rodjek/puppet-logrotate/blob/master/manifests/rule.pp#L315-L321 the $rotate variable is checked if it is a number or the string 'undef' by using a regex (it happens again later for the $shredcycles as well). Unfortunately, under the future parser numbers are actually numbers and cannot have a regex applied to them since there is no automatic conversion to string. An issue (PUP-3083) filed against puppet provides a small snippet that shows the problem:
The example works (issues MATCH) on puppet 3.6's current parser but not the future parser (--parser future causes it to issue Not MATCH).
The most straightforward fix for this is to just quote the case value: case "$test", which forces it to stringify the value and allows a regex to be used. This is backwards compatible with the current parser.
The text was updated successfully, but these errors were encountered:
At https://github.com/rodjek/puppet-logrotate/blob/master/manifests/rule.pp#L315-L321 the
$rotate
variable is checked if it is a number or the string 'undef' by using a regex (it happens again later for the$shredcycles
as well). Unfortunately, under the future parser numbers are actually numbers and cannot have a regex applied to them since there is no automatic conversion to string. An issue (PUP-3083) filed against puppet provides a small snippet that shows the problem:The example works (issues
MATCH
) on puppet 3.6's current parser but not the future parser (--parser future
causes it to issueNot MATCH
).The most straightforward fix for this is to just quote the case value:
case "$test"
, which forces it to stringify the value and allows a regex to be used. This is backwards compatible with the current parser.The text was updated successfully, but these errors were encountered: