diff --git a/cluster.yml b/cluster.yml index 0e014371e..995e36309 100644 --- a/cluster.yml +++ b/cluster.yml @@ -34,7 +34,7 @@ - { role: download, tags: download, skip_downloads: false } environment: "{{proxy_env}}" -- hosts: etcd:k8s-cluster:vault +- hosts: etcd:k8s-cluster:vault:calico-rr any_errors_fatal: "{{ any_errors_fatal | default(true) }}" roles: - { role: kubespray-defaults, when: "cert_management == 'vault'" } @@ -47,13 +47,13 @@ - { role: kubespray-defaults} - { role: etcd, tags: etcd, etcd_cluster_setup: true } -- hosts: k8s-cluster +- hosts: k8s-cluster:calico-rr any_errors_fatal: "{{ any_errors_fatal | default(true) }}" roles: - { role: kubespray-defaults} - { role: etcd, tags: etcd, etcd_cluster_setup: false } -- hosts: etcd:k8s-cluster:vault +- hosts: etcd:k8s-cluster:vault:calico-rr any_errors_fatal: "{{ any_errors_fatal | default(true) }}" roles: - { role: kubespray-defaults} diff --git a/roles/network_plugin/calico/tasks/main.yml b/roles/network_plugin/calico/tasks/main.yml index 7c8e247fc..15d793fdb 100644 --- a/roles/network_plugin/calico/tasks/main.yml +++ b/roles/network_plugin/calico/tasks/main.yml @@ -170,7 +170,7 @@ "apiVersion": "v1", "metadata": {"node": "{{ inventory_hostname }}", "scope": "node", - "peerIP": "{{ hostvars[item]["calico_rr_ip"]|default(hostvars[item]["ip"])|default(hostvars[item]["ansible_default_ipv4.address"]) }}"} + "peerIP": "{{ hostvars[item]["calico_rr_ip"]|default(hostvars[item]["ip"])|default(hostvars[item]["ansible_default_ipv4"]["address"]) }}"} }' | {{ bin_dir }}/calicoctl create --skip-exists -f - with_items: "{{ groups['calico-rr'] | default([]) }}"