fix(multus): loop_control template error when item is None (#10347) (#10726)

Co-authored-by: Nicolas Goudry <nicolas-goudry@users.noreply.github.com>
pull/10772/head
Max Gautier 2023-12-18 12:03:49 +01:00 committed by GitHub
parent 7dcbe415f8
commit 336b323954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@
run_once: true
with_items: "{{ multus_manifest_1.results + (multus_nodes_list|map('extract', hostvars, 'multus_manifest_2')|list|json_query('[].results')) }}"
loop_control:
label: "{{ item.item.name }}"
label: "{{ item.item.name if item != None else 'skipped' }}"
vars:
multus_nodes_list: "{{ groups['k8s_cluster'] if ansible_play_batch|length == ansible_play_hosts_all|length else ansible_play_batch }}"
when: