voxpupuli / puppet-squid

Puppet module for configuration of squid caching proxy.
https://forge.puppet.com/puppet/squid
Other
12 stars 54 forks source link

Remove spurious ':' from refresh_pattern template #87

Closed ralfbosz closed 6 years ago

ralfbosz commented 6 years ago

When using a regexp (when case_sensitive is set to false) the -i should be placed BEFORE the $name and not after Also fixed that no space was used between the max and options field, added rspec for options

ralfbosz commented 6 years ago

in doubt about the : which is used in the template, that should not be fixed, only few refresh_patterns use it, gonna change that too... after some testing...

ralfbosz commented 6 years ago

remove the default use of : after the title, this is not default, see examples:

http://www.squid-cache.org/Doc/config/refresh_pattern/

ralfbosz commented 6 years ago

seems I didn't check all the PR's, this is in part: https://github.com/voxpupuli/puppet-squid/pull/65

traylenator commented 6 years ago

To be clear someone doing.

squid::refresh_pattern{'ftp':
  min  => 20,
  max => 30,
  percent 100,
}

were getting

refresh_pattern ftp: 100 20 30

and now the will get

refresh_pattern ftp 100 20 30

backwards incompatible but the old behaviour was wrong.

ralfbosz commented 6 years ago

Correct, the old behaviour was wrong, see also #65 which also addresses this, but fails in Travis...

For you sample, the person would have to use:

squid::refresh_pattern{'ftp:':
  min => 20,
  max => 30,
  percent => 100,
}