fix: loop_var under loop_control in drain.yml and restore.yml

This commit is contained in:
Semaphore
2026-03-14 14:25:24 -07:00
parent e771f6d9a9
commit a19fe2ce5d
8 changed files with 50 additions and 11 deletions

View File

@@ -136,7 +136,8 @@
when: not migration_bulk | bool
include_tasks: migrate_guest.yml
loop: "{{ migration_plan | rejectattr('needs_fallback') | list + migration_plan | selectattr('needs_fallback') | rejectattr('needs_fallback' if live_migrate_fallback == 'skip' else 'nonexistent') | list }}"
loop_var: guest
loop_control:
loop_var: guest
- name: Drain | Migrate guests (bulk — fire all at once)
when: migration_bulk | bool
@@ -154,7 +155,8 @@
validate_certs: false
register: bulk_migration_tasks
loop: "{{ migration_plan | rejectattr('needs_fallback') | list }}"
loop_var: guest
loop_control:
loop_var: guest
delegate_to: localhost
- name: Drain | Bulk | Wait for all migrations to complete
@@ -181,6 +183,6 @@
- name: Drain | Bulk | Handle fallback guests sequentially
include_tasks: migrate_guest.yml
loop: "{{ migration_plan | selectattr('needs_fallback') | list }}"
loop_var: guest
loop_control:
loop_var: guest
when: live_migrate_fallback != 'skip'