Skip to content

Commit

Permalink
Merge pull request #3334 from holta/avoid-iiab.ini-pollution
Browse files Browse the repository at this point in the history
detected_network.yml: Disallow multi-line var second_gateway_found ~= exclude_devices (to avoid polluting /etc/iiab/iiab.ini)
  • Loading branch information
holta committed Aug 4, 2022
2 parents 6bb19e2 + 664dd5d commit 45bd088
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions roles/network/tasks/detected_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@
register: second_gateway_found
changed_when: False

- name: If multiple secondary gateways are detected, fail intentionally and explain
fail:
msg: "IIAB currently DOES NOT SUPPORT multiple secondary gateways: {{ second_gateway_found.stdout }}"
when: second_gateway_found.stdout_lines is defined and second_gateway_found.stdout_lines | length > 1

- name: Set exclude_devices if default gateway has been detected for {{ second_gateway_found.stdout }}
set_fact:
exclude_devices: "{{ second_gateway_found.stdout }}"
Expand Down

0 comments on commit 45bd088

Please sign in to comment.