Filter computes with nova_host defined

When adding hosts to aggregates/availability zones, use the nodes
that have nova_host defined. This would exclude blacklisted nodes.

Change-Id: I85599dbb985a9d45e2e7587170c39aa2940ca939
(cherry picked from commit 00a22232fc)
This commit is contained in:
Rabi Mishra 2020-11-03 19:09:14 +05:30
parent 55eafcb8a7
commit 15a196e79f
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ outputs:
os_nova_host_aggregate:
name: {get_attr: [NovaComputeAvailabilityZoneValue, value]}
availability_zone: {get_attr: [NovaComputeAvailabilityZoneValue, value]}
hosts: "{{ groups['nova_compute'] | default([]) | map('extract', hostvars, 'nova_host') | list }}"
hosts: "{{ groups['nova_compute'] | default([]) | map('extract', hostvars, 'nova_host') | select('defined') | list }}"
auth:
username: admin
password: {get_param: AdminPassword}