From 5821a662f54d7181e7d97eeb536da6b8abbfd6cf Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Wed, 16 Feb 2022 16:36:19 +0100 Subject: [PATCH] Dynamic inventory: do not set network_interface The same variable is used in Bifrost for a different purpose. Change-Id: I3c9023a428314a83c0627496a7c488814efd837b --- bifrost/inventory.py | 5 +++++ releasenotes/notes/network-interface-ad1396813b83bf38.yaml | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/network-interface-ad1396813b83bf38.yaml diff --git a/bifrost/inventory.py b/bifrost/inventory.py index 5629030d2..dfc91c67a 100755 --- a/bifrost/inventory.py +++ b/bifrost/inventory.py @@ -316,6 +316,11 @@ def main(): if len(groups[group]['hosts']) == 0: del groups[group] + # FIXME(dtantsur): there is a conflict between the Bifrost's and the node's + # network_interface. Drop the node's one for now. + for host, items in hostvars.items(): + items.pop('network_interface', None) + # General Data Conversion inventory = {'_meta': {'hostvars': hostvars}} diff --git a/releasenotes/notes/network-interface-ad1396813b83bf38.yaml b/releasenotes/notes/network-interface-ad1396813b83bf38.yaml new file mode 100644 index 000000000..fa38dbc4f --- /dev/null +++ b/releasenotes/notes/network-interface-ad1396813b83bf38.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes the Bifrost inventory plugin to not set the ``network_interface`` + variable since it conflicts with the Bifrost's variable with a different + meaning.