attachmentgenie / attachmentgenie-ufw

MIT License
21 stars 27 forks source link

"any" source match is broken #25

Closed igalic closed 10 years ago

igalic commented 10 years ago

I seem to have introduced this one myself in https://github.com/attachmentgenie/puppet-module-ufw/commit/763c7be0f063ff5f3fd25d45ab1f9a2af58682e7

  $unless = "${ipadr}:${port}" ? {
    'any:all' => "ufw status | grep -qE '^ +ALLOW +${from_match}$'",

The ^anchoring of the Regex makes the expression fail every time, and hence this part of the module not idempotent.

We have to change it back to

  $unless = "${ipadr}:${port}" ? {
    'any:all' => "ufw status | grep -qE ' +ALLOW +${from_match}$'",