debops / ansible-ifupdown

Manage network interface configuration in /etc/network/interfaces
GNU General Public License v3.0
25 stars 14 forks source link

Auto config rollback if something goes wrong #59

Open ypid opened 7 years ago

ypid commented 7 years ago

Simple example. I have a host with one interface and I want to reconfigure that interface. Now it can happen that I make a mistake, for example by specifying a IP address without subnet mask (has happened to me a couple of times), then I run the role and lost network connectivity to the host. With the reintroduced ifupdown__reconfigure_auto this can be somewhat limited, but one might not catch all mistakes easily thus it would be nice if the script which applies the interface config would roll back to the last known good state if something goes wrong.

The question is just how to detect that. I see two options:

Related to: https://github.com/debops/ansible-ifupdown/pull/58#issuecomment-260877767 PS: I really liked pyroman because of that feature :wink: