]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
avoid to remove spaces outside string hex
authoradrianiurca <adrian.iurca@gmail.com>
Mon, 11 Jan 2021 16:03:38 +0000 (18:03 +0200)
committeradrianiurca <adrian.iurca@gmail.com>
Mon, 11 Jan 2021 16:03:38 +0000 (18:03 +0200)
lib/puppet/type/firewall.rb

index 1f38384760ebdb84053361670f5cec9040243ed5..e227aba31541a5fd8e249e569bcbb9e8be873b8f 100644 (file)
@@ -2075,7 +2075,7 @@ Puppet::Type.newtype(:firewall) do
       given as an argument.
     PUPPETCODE
     munge do |value|
-      _value = value.delete(' ')
+      _value = value.split('|').map { |x| x.include?('!') ? x : "|#{x.delete(' ')}|" }.join
     end
   end