example42 / puppet-iptables

Iptables Puppet Module (for host based firewalling)
http://www.example42.com
Other
14 stars 41 forks source link

Rubified all loops #32

Closed Freeaqingme closed 11 years ago

Freeaqingme commented 11 years ago

@example42 I think it should work now without the future parser and with older versions of Puppet as well. I'm not sure though, as my testing setup requires the future parser (I've got other classes that requires it). There are however no more instances of the phrase 'each' in puppet code.

Freeaqingme commented 11 years ago

You're quick! Ty ;)

alvagante commented 11 years ago

Well, have to test it yet... but since it's on devel...

alvagante commented 11 years ago

there are still some future parser only constructs:

{"iptables_rule_v4_example42-rules-default_action-output-20-beabc1068295a3b4cb4258458d433361e03bab02"=>{"target"=>"/var/lib/puppet/iptables/tables/v4_filter", "content"=>"-A OUTPUT -j ACCEPT \n", "order"=>"9990", "ensure"=>"present"}} {"iptables_rule_v6_example42-rules-default_action-output-20-beabc1068295a3b4cb4258458d433361e03bab02"=>{"target"=>"/var/lib/puppet/iptables/tables/v6_filter", "content"=>"-A OUTPUT -j ACCEPT \n", "order"=>"9990", "ensure"=>"present"}} Error: Unsupported Operation: Array concatenation available with '--parser future' setting only. at /tmp/vagrant-puppet/modules-0/iptables/manifests/rule.pp:177 on node debian7-64.example42.com Wrapped exception: Unsupported Operation: Array concatenation available with '--parser future' setting only. Error: Unsupported Operation: Array concatenation available with '--parser future' setting only. at /tmp/vagrant-puppet/modules-0/iptables/manifests/rule.pp:177 on node debian7-64.example42.com

alvagante commented 11 years ago
$log_explicit_matches = $explicit_matches + 
                        {'limit' => {'limit-burst' => $log_limit_burst,
                                     'limit' => $log_limit }
                        }

would like so much to have these hash operations on old parser...

Freeaqingme commented 11 years ago

Sigh. That's bizarre. The old parser supported $foo = {}; $foo['foo'] = 'bar'

The new one requires those dirty template_inline hacks.