2018-11-04 17:07:38 +08:00
|
|
|
---
|
|
|
|
- name: Multus | Start resources
|
|
|
|
kube:
|
2019-05-03 05:24:21 +08:00
|
|
|
name: "{{ item.item.name }}"
|
2018-11-04 17:07:38 +08:00
|
|
|
namespace: "kube-system"
|
2019-05-03 05:24:21 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "{{ item.item.type }}"
|
|
|
|
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
2018-11-04 17:07:38 +08:00
|
|
|
state: "latest"
|
2023-01-17 15:30:33 +08:00
|
|
|
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
|