From: David Galloway Date: Thu, 2 Jul 2026 13:30:31 +0000 (-0400) Subject: maas: Look up inventory MACs for the target host, not the play host X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=63cf500dcf0b842df80aebbe43dffbec3a7bad67;p=ceph-cm-ansible.git maas: Look up inventory MACs for the target host, not the play host update.yml runs against hosts other than inventory_hostname (machines.yml passes inv_host for exactly this reason), so the _inv_macs collection was reading the wrong host's *_mac vars. Signed-off-by: David Galloway --- diff --git a/roles/maas/tasks/machines/update.yml b/roles/maas/tasks/machines/update.yml index 0169b066..d7d60db1 100644 --- a/roles/maas/tasks/machines/update.yml +++ b/roles/maas/tasks/machines/update.yml @@ -146,7 +146,7 @@ set_fact: _inv_macs: >- {{ - hostvars[inventory_hostname] + hostvars[inv_host] | dict2items | selectattr('key', 'search', '_mac$') | map(attribute='value')