I took over administrative duties for an Linux environment of around 20 boxes. Trying to consolidate configuration management with Puppet. Most is straightforward, however I stumbled on the firewall rules.
Previous administrator relied on a custom script that created
iptables rules for each box out of a common template.
The template rules look like this:
hostname: Action Interface Source Protocol destPort
ALL: Accept eth0 any tcp 80 server4: Accept All x.x.x.x/24 tcp/udp 111 node5: Deny All y.y.y.y
Rules for ALL would apply to all boxes. The rest of the params are used to populate iptables rules. There are about 250 rules in the template.
Is it possible to re-use this common template via puppet and build iptables ruleset for each node? Is this kind of text mangling even possible with puppet?