mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
Add loopback device to black_list_names when deleting all profiles except explicitly included - address #689
Signed-off-by: Emilio Palumbo <emiliopalumbo@gmail.com>
This commit is contained in:
parent
b6a6268171
commit
3df2be4e86
1 changed files with 4 additions and 0 deletions
|
|
@ -2407,6 +2407,10 @@ class Cmd_nm(Cmd):
|
|||
# Delete all profiles except explicitly included
|
||||
black_list_names = ArgUtil.connection_get_non_absent_names(self.connections)
|
||||
|
||||
# Keep loopback device too. Deleting it would trigger a 'changed' state
|
||||
# every time the playbook is run as the device is recreated
|
||||
black_list_names.add("lo")
|
||||
|
||||
for nm_profile in self._nm_provider.get_connections():
|
||||
if name and nm_profile.get_id() != name:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue