diff --git a/roles/network_plugin/calico/tasks/main.yml b/roles/network_plugin/calico/tasks/main.yml index b3cacaec40057219f78111ea0ada8a0c96e768c2..f3072d3880e8359458e8b1d795b4b1cedddca5c3 100644 --- a/roles/network_plugin/calico/tasks/main.yml +++ b/roles/network_plugin/calico/tasks/main.yml @@ -83,8 +83,8 @@ uri: url: https://localhost:2379/health validate_certs: no - client_cert: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem" - client_key: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem" + client_cert: "{{ etcd_cert_dir }}/node-{{ groups['etcd'][0] }}.pem" + client_key: "{{ etcd_cert_dir }}/node-{{ groups['etcd'][0] }}-key.pem" register: result until: result.status == 200 or result.status == 401 retries: 10 diff --git a/roles/network_plugin/canal/tasks/main.yml b/roles/network_plugin/canal/tasks/main.yml index 7eeb93919e4a0c5fe5d8d4fe0ba952424d44a98b..d42f4ec5688cfeedbe497bfce67e2c416af1998b 100644 --- a/roles/network_plugin/canal/tasks/main.yml +++ b/roles/network_plugin/canal/tasks/main.yml @@ -35,8 +35,8 @@ changed_when: false run_once: true environment: - ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem" - ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem" + ETCDCTL_CERT_FILE: "{{ etcd_cert_dir }}/node-{{ groups['etcd'][0] }}.pem" + ETCDCTL_KEY_FILE: "{{ etcd_cert_dir }}/node-{{ groups['etcd'][0] }}-key.pem" - name: Canal | Create canal node manifests template: