I would like to deploy iptables rules in a "safe" way using ansible where for safe I think at something like the shorewall command safe-restart
.
So I'm looking for a workflow like this:
- install the new rules;
- wait for 30 seconds for a confirmation from the user (or, in our case, from the machine executing the playbook);
- if the user confirms then make them permanent, otherwise restore the old rules.
My goal is to avoid losing control of my machines because of a wrong firewall configuration (that may, for example, block SSH).