mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
[PR #11995/02b969ee backport][stable-12] cobbler_system: fix KeyError when adding new interface to existing system (#12003)
cobbler_system: fix `KeyError` when adding new interface to existing system (#11995)
* fix(cobbler_system): handle missing interface device on existing system
When adding a new interface to an existing Cobbler system that does not
yet have that interface defined, the module raised a KeyError. Use .get()
with a fallback empty dict to safely handle that case. Also add a
continue after the unknown-property warning to prevent a secondary
KeyError on IFPROPS_MAPPING lookup.
Fixes: #7007
* chore(cobbler_system): add changelog fragment for #11995
---------
(cherry picked from commit 02b969ee4d)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
bugfixes:
|
||||
- cobbler_system - fix ``KeyError`` when adding a new interface to an existing system that does not yet have it defined
|
||||
(https://github.com/ansible-collections/community.general/issues/7007,
|
||||
https://github.com/ansible-collections/community.general/pull/11995).
|
||||
Reference in New Issue
Block a user