michaelrigart / ansible-role-interfaces

An ansible role for configuring different network interfaces
GNU General Public License v3.0
83 stars 62 forks source link

Issue #12: Bridge config can cause connection loss #13

Closed markgoddard closed 7 years ago

markgoddard commented 7 years ago

In some cases we might find that bouncing a bridge interface separately from its ports can cause us to lose connectivity. This might be because the bridge is being an assigned an IP that was previously assigned to one of the ports, or because bringing up the bridge adds a default route that is not accessible while the ports are inactive or detached from the bridge.

To overcome this limitation, we bounce (ifdown/ifup) the bridge and its ports in a single task. This requires some fairly meaty logic to select which interfaces to bounce. This logic includes the use of the equalto Jinja2 test, which adds a dependency on jinja-2.8.