]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
maas: Look up inventory MACs for the target host, not the play host
authorDavid Galloway <david.galloway@ibm.com>
Thu, 2 Jul 2026 13:30:31 +0000 (09:30 -0400)
committerDavid Galloway <david.galloway@ibm.com>
Thu, 2 Jul 2026 13:30:31 +0000 (09:30 -0400)
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 <david.galloway@ibm.com>
roles/maas/tasks/machines/update.yml

index 0169b066073efac0fba7b8c81ec1af9703e81349..d7d60db14db5b7d5bcef446cffa5a46f0a8b18a2 100644 (file)
   set_fact:
     _inv_macs: >-
       {{
-        hostvars[inventory_hostname]
+        hostvars[inv_host]
         | dict2items
         | selectattr('key', 'search', '_mac$')
         | map(attribute='value')