Skip to content

Commit

Permalink
Ensure local _cifmw_networking_mapper_definition fact is empty
Browse files Browse the repository at this point in the history
With the coming networking changes in the Framework, we're calling the
networking_mapper role multiple times, and some of those calls involve a
temporary patch to inject a specific network.

This patch ensures we're always taking a clean, empty
_cifmw_networking_mapper_definition in order to ensure we're not
re-applying any previous patch/modification.
  • Loading branch information
cjeanner committed Jun 3, 2024
1 parent 8c5894f commit bbde31f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/networking_mapper/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
file: "{{ cifmw_networking_mapper_ifaces_info_path }}"
name: cifmw_networking_mapper_ifaces_info

- name: Ensure local fact is empty
ansible.builtin.set_fact:
_cifmw_networking_mapper_definition: {}

- name: Set the input Networking Definition and patch it if needed
vars:
_net_def_patches: >-
Expand All @@ -58,7 +62,6 @@
_cifmw_networking_mapper_definition: >-
{{
_cifmw_networking_mapper_definition |
default({}) |
combine(item, recursive=True)
}}
loop: "{{ [cifmw_networking_definition] + _net_def_patches }}"
Expand Down

0 comments on commit bbde31f

Please sign in to comment.