fix: loop_var under loop_control in drain.yml and restore.yml
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user