Network connectivity: Fix regression with noip

When using no_ip on all hosts on a given network, the <network>_ips key
will not exist in network-allocations.yml at all, so we need to tolerate
this key not existing.

Closes-Bug: #2125560
Change-Id: I1b71990af38a8fd6c6258a49d2b94e16496fb274
Signed-off-by: Will Szumski <will@stackhpc.com>
This commit is contained in:
Will Szumski
2025-09-25 09:34:16 +01:00
committed by Pierre Riteau
parent 751d52ca44
commit f376ae0795
2 changed files with 6 additions and 1 deletions

View File

@@ -91,5 +91,5 @@
# in the command. Assumption was that this was being evaluated once
# for the when clause and then again for the command. Bug?
remote_host: "{{ remote_hosts | random(seed=ansible_facts.date_time.iso8601) }}"
remote_ip: "{{ lookup('cached', 'vars', item ~ '_ips')[remote_host] | default('', true) }}"
remote_ip: "{{ lookup('cached', 'vars', item ~ '_ips', default={})[remote_host] | default('', true) }}"
mtu: "{{ item | net_mtu }}"

View File

@@ -0,0 +1,5 @@
---
fixes:
- |
Fixes a regression in network connectivity check when using the ``no_ip``
attribute. `LP#2125560 <https://bugs.launchpad.net/kayobe/+bug/2125560>`__