Fix overcloud deprovision hosts list in prompt

Hosts that weren't part of the overcloud group would be included in the
list when this is run without a limit.

Closes-Bug: #2091621
Change-Id: Id3d68b55e18dfe9c44805b6e2602e00eadecc76a
This commit is contained in:
Matt Crees 2024-12-13 11:18:12 +00:00
parent 3a92663765
commit f27755aeb2
2 changed files with 7 additions and 1 deletions

View File

@ -37,7 +37,7 @@
- name: confirm_deprovision
prompt: |
The following hosts will be deprovisioned:
{{ play_hosts | join(', ') }}
{{ play_hosts | intersect(groups['overcloud'] | default([])) | join(', ') }}
If you want to proceed type: yes
default: "no"
private: false

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes a bug where non-overcloud hosts would show up in the confirmation
prompt for `kayobe overcloud deprovision`
`LP#2091703 <https://bugs.launchpad.net/kayobe/+bug/2091621>`__