Skip to content

Commit 3df2be4

Browse files
emi80richm
authored andcommitted
Add loopback device to black_list_names when deleting all profiles except explicitly included - address #689
Signed-off-by: Emilio Palumbo <emiliopalumbo@gmail.com>
1 parent b6a6268 commit 3df2be4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/network_connections.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,10 @@ def run_action_absent(self, idx):
24072407
# Delete all profiles except explicitly included
24082408
black_list_names = ArgUtil.connection_get_non_absent_names(self.connections)
24092409

2410+
# Keep loopback device too. Deleting it would trigger a 'changed' state
2411+
# every time the playbook is run as the device is recreated
2412+
black_list_names.add("lo")
2413+
24102414
for nm_profile in self._nm_provider.get_connections():
24112415
if name and nm_profile.get_id() != name:
24122416
continue

0 commit comments

Comments
 (0)