|
|
@ -39,7 +39,7 @@ |
|
|
|
fail: |
|
|
|
msg: 'Only one network pool must be configured and it must be the subnet {{ kube_pods_subnet }}. |
|
|
|
Please erase calico configuration and run the playbook again ("etcdctl rm --recursive /calico/v1/ipam/v4/pool")' |
|
|
|
when: ( calico_pools.json['node']['nodes'] | length > 1 ) or |
|
|
|
when: ( calico_pools.json['node']['nodes'] | length > 1 ) or |
|
|
|
( not calico_pools.json['node']['nodes'][0]['key'] | search(".*{{ kube_pods_subnet | ipaddr('network') }}.*") ) |
|
|
|
run_once: true |
|
|
|
delegate_to: "{{ groups['etcd'][0] }}" |
|
|
@ -51,7 +51,7 @@ |
|
|
|
- name: Calico | Write calico-node systemd init file |
|
|
|
template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service |
|
|
|
when: init_system == "systemd" |
|
|
|
notify: restart calico-node |
|
|
|
notify: restart systemd-calico-node |
|
|
|
|
|
|
|
- name: Calico | Write calico-node initd script |
|
|
|
template: src=calico/deb-calico.initd.j2 dest=/etc/init.d/calico-node owner=root mode=755 |
|
|
|