By default, set the comment for a rule to the resource name. This enables simple rule creation with nice comments. Of course, if a user wants to they can still set an arbitrary resource name and specify a comment separately.
Instead of:
simple_iptables_rule 'some arbitrary thing' do
comment 'accept all on loopback interface'
chain 'INPUT'
rule '--in-interface lo'
jump 'ACCEPT'
weight 1
end
We can now do this:
simple_iptables_rule 'accept all on loopback interface' do
chain 'INPUT'
rule '--in-interface lo'
jump 'ACCEPT'
weight 1
end
By default, set the comment for a rule to the resource name. This enables simple rule creation with nice comments. Of course, if a user wants to they can still set an arbitrary resource name and specify a comment separately.
Instead of:
We can now do this: