[multus] fixed for using with cluster/upgrade-cluster/scale playbooks
This commit is contained in:
parent
58f62d8f47
commit
5fd1e9d358
2 changed files with 8 additions and 4 deletions
|
@ -7,5 +7,11 @@
|
|||
resource: "{{ item.item.type }}"
|
||||
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
||||
state: "latest"
|
||||
with_items: "{{ multus_manifest_1.results }} + {{ groups['k8s_cluster']|map('extract', hostvars, 'multus_manifest_2')|list|json_query('[].results') }}"
|
||||
when: inventory_hostname == groups['kube_control_plane'][0] and not item is skipped
|
||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
||||
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 }}"
|
||||
vars:
|
||||
multus_nodes_list: "{{ groups['k8s_cluster'] if ansible_play_batch|length == ansible_play_hosts_all|length else ansible_play_batch }}"
|
||||
when: not item is skipped
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
- name: Multus | Check container engine type
|
||||
set_fact:
|
||||
container_manager_types: "{{ ansible_play_hosts_all|map('extract', hostvars, ['container_manager'])|list|unique }}"
|
||||
run_once: true
|
||||
when: inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
- name: Multus | Copy manifest templates
|
||||
template:
|
||||
|
|
Loading…
Reference in a new issue