adding --skip-exists flag for peer_with_router

This commit is contained in:
Justin Hunthrop 2017-05-25 14:29:18 -05:00
parent 34e0e55fe6
commit 419522784f

View file

@ -219,7 +219,7 @@
"apiVersion": "v1", "apiVersion": "v1",
"metadata": {"node": "{{ inventory_hostname }}", "scope": "node", "peerIP": "{{ item.router_id }}"} "metadata": {"node": "{{ inventory_hostname }}", "scope": "node", "peerIP": "{{ item.router_id }}"}
}' }'
| {{ bin_dir }}/calicoctl create -f - | {{ bin_dir }}/calicoctl create --skip-exists -f -
with_items: "{{ peers|default([]) }}" with_items: "{{ peers|default([]) }}"
when: (not legacy_calicoctl and when: (not legacy_calicoctl and
peer_with_router|default(false) and inventory_hostname in groups['k8s-cluster']) peer_with_router|default(false) and inventory_hostname in groups['k8s-cluster'])