diff --git a/roles/network_plugin/calico/tasks/main.yml b/roles/network_plugin/calico/tasks/main.yml index 44ea00e83..05e7b9611 100644 --- a/roles/network_plugin/calico/tasks/main.yml +++ b/roles/network_plugin/calico/tasks/main.yml @@ -81,7 +81,7 @@ - name: Calico | wait for etcd uri: - url: https://localhost:2379/health + url: "{{ etcd_access_addresses.split(',') | first }}/health" validate_certs: no client_cert: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem" client_key: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem" @@ -97,7 +97,7 @@ --cacert {{ etcd_cert_dir }}/ca.pem \ --cert {{ etcd_cert_dir}}/node-{{ inventory_hostname }}.pem \ --key {{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem \ - https://localhost:2379/v2/keys/calico/v1/ipam/v4/pool + {{ etcd_access_addresses.split(',') | first }}/v2/keys/calico/v1/ipam/v4/pool register: calico_conf retries: 4 delay: "{{ retry_stagger | random + 3 }}" @@ -125,7 +125,7 @@ --cacert {{ etcd_cert_dir }}/ca.pem \ --cert {{ etcd_cert_dir}}/node-{{ inventory_hostname }}.pem \ --key {{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem \ - https://localhost:2379/v2/keys/calico/v1/ipam/v4/pool + {{ etcd_access_addresses.split(',') | first }}/v2/keys/calico/v1/ipam/v4/pool register: calico_pools_raw retries: 4 delay: "{{ retry_stagger | random + 3 }}"