Skip to content
Snippets Groups Projects
Commit c9290182 authored by Aleksandr Didenko's avatar Aleksandr Didenko
Browse files

Fix possible problems with legacy calicoctl

When running legacy calicoctl we do not specify calico hostname in
calico-node container thus we should not specify it in CNI config.

Also move 'legacy_calicoctl' set_fact task to the top.
parent 36fe2cb5
No related branches found
No related tags found
No related merge requests found
---
- name: Calico | Check calicoctl version
run_once: true
set_fact:
legacy_calicoctl: "{{ calicoctl_image_tag | version_compare('v1.0.0', '<') }}"
- name: Calico | Write Calico cni config
template:
src: "cni-calico.conf.j2"
......@@ -70,11 +75,6 @@
delegate_to: "{{groups['etcd'][0]}}"
run_once: true
- name: Calico | Check calicoctl version
run_once: true
set_fact:
legacy_calicoctl: "{{ calicoctl_image_tag | version_compare('v1.0.0', '<') }}"
- name: Calico | Configure calico network pool
shell: >
echo '{
......
{
"name": "calico-k8s-network",
{% if not legacy_calicoctl %}
"hostname": "{{ inventory_hostname }}",
{% endif %}
"type": "calico",
"etcd_endpoints": "{{ etcd_access_endpoint }}",
"etcd_cert_file": "{{ etcd_cert_dir }}/node.pem",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment