|
@ -101,7 +101,7 @@ |
|
|
run_once: true |
|
|
run_once: true |
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
when: |
|
|
when: |
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '>') or calico_upgrade_enabled |
|
|
|
|
|
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
- 'calico_conf.stdout == "0"' |
|
|
- 'calico_conf.stdout == "0"' |
|
|
|
|
|
|
|
|
- name: Calico | Configure calico network pool (legacy) |
|
|
- name: Calico | Configure calico network pool (legacy) |
|
@ -145,8 +145,7 @@ |
|
|
run_once: true |
|
|
run_once: true |
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
when: |
|
|
when: |
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '>') or calico_upgrade_enabled |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
- name: Calico | Set global as_num (legacy) |
|
|
- name: Calico | Set global as_num (legacy) |
|
|
command: "{{ bin_dir}}/calicoctl config set asNumber {{ global_as_num }}" |
|
|
command: "{{ bin_dir}}/calicoctl config set asNumber {{ global_as_num }}" |
|
|
run_once: true |
|
|
run_once: true |
|
@ -181,7 +180,7 @@ |
|
|
with_items: |
|
|
with_items: |
|
|
- "{{ peers|default([]) }}" |
|
|
- "{{ peers|default([]) }}" |
|
|
when: |
|
|
when: |
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '>') or calico_upgrade_enabled |
|
|
|
|
|
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
- peer_with_router|default(false) |
|
|
- peer_with_router|default(false) |
|
|
- inventory_hostname in groups['k8s-cluster'] |
|
|
- inventory_hostname in groups['k8s-cluster'] |
|
|
|
|
|
|
|
@ -222,7 +221,7 @@ |
|
|
with_items: |
|
|
with_items: |
|
|
- "{{ groups['calico-rr'] | default([]) }}" |
|
|
- "{{ groups['calico-rr'] | default([]) }}" |
|
|
when: |
|
|
when: |
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '>') or calico_upgrade_enabled |
|
|
|
|
|
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
- peer_with_calico_rr|default(false) |
|
|
- peer_with_calico_rr|default(false) |
|
|
- inventory_hostname in groups['k8s-cluster'] |
|
|
- inventory_hostname in groups['k8s-cluster'] |
|
|
- hostvars[item]['cluster_id'] == cluster_id |
|
|
- hostvars[item]['cluster_id'] == cluster_id |
|
|