Hi Folks,
I'm trying to figure our why if I pass an array to a augeas resource type
it ends up being concatenated eg for the following example I would expect
2 firewall rules, but instead I get one rule with the dport = 17001701
class {'test':
port => ['1700', '1701'],
}
class test ($port) {
augeas{"$port":
context => "/files/etc/sysconfig/iptables/table",
changes => ['ins append before append[.="INPUT"][last()]',
'defnode INPUT append[.=""] INPUT',
'set $INPUT INPUT',
'set $INPUT/match[1] state',
'set $INPUT/state NEW',
'set $INPUT/match[2] tcp',
'set $INPUT/protocol tcp',
"set \$INPUT/dport $port",
'set $INPUT/jump ACCEPT'],
onlyif => "match append[*]/dport[.=\"$port\"] size == 0",
}
}
Anyone got any suggestions?
Cheers
Steve
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/0S89Gxr5rHgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.