Skip to content

Commit

Permalink
Never deploy if user flag is false
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewiebe committed Feb 25, 2025
1 parent b179ee4 commit 05f0865
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions plugins/modules/dcnm_vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2154,6 +2154,9 @@ def diff_merge_attach(self, replace=False):

all_vrfs = ""
for want_a in self.want_attach:
# Check user intent for this VRF and don't add it to the deploy_vrf
# list if the user has not requested a deploy.
want_config = self.find_dict_in_list_by_key_value(search=self.config, key='vrf_name', value=want_a["vrfName"])
deploy_vrf = ""
attach_found = False
for have_a in self.have_attach:
Expand All @@ -2168,12 +2171,10 @@ def diff_merge_attach(self, replace=False):
base.update({"lanAttachList": diff})

diff_attach.append(base)
if deploy_vrf_bool is True:
if (want_config['deploy'] is True) and (deploy_vrf_bool is True):
deploy_vrf = want_a["vrfName"]
else:
if deploy_vrf_bool or self.conf_changed.get(
want_a["vrfName"], False
):
if want_config['deploy'] is True and (deploy_vrf_bool or self.conf_changed.get(want_a["vrfName"], False)):
deploy_vrf = want_a["vrfName"]

msg = f"attach_found: {attach_found}"
Expand Down

0 comments on commit 05f0865

Please sign in to comment.