ansible-ferm
ansible-ferm copied to clipboard
Merge tasks "Remove iptables INPUT rules if requested" and "Configure iptables INPUT rules"
These are identical except for the state differing. This can be unified using:
state: '{{ "absent" if (item.delete | default(false)) else 'present' }}"
Good idea, although kinda Ruby-ish looking. :-) I guess I'm not used to it. But if it removes a task, I'm all for it!