2016-11-08 11:13:20 +00:00
|
|
|
- name: Create canal ConfigMap
|
|
|
|
run_once: true
|
|
|
|
kube:
|
|
|
|
name: "canal-config"
|
|
|
|
kubectl: "{{bin_dir}}/kubectl"
|
2016-12-13 10:43:06 +00:00
|
|
|
filename: "{{kube_config_dir}}/canal-config.yaml"
|
2016-11-08 11:13:20 +00:00
|
|
|
resource: "configmap"
|
2016-12-13 10:43:06 +00:00
|
|
|
namespace: "{{system_namespace}}"
|
2016-11-08 11:13:20 +00:00
|
|
|
|
2017-02-08 14:13:17 +00:00
|
|
|
#FIXME: remove if kubernetes/features#124 is implemented
|
|
|
|
- name: Purge old flannel and canal-node
|
|
|
|
run_once: true
|
|
|
|
kube:
|
|
|
|
name: "canal-node"
|
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
filename: "{{ kube_config_dir }}/canal-node.yml"
|
|
|
|
resource: "ds"
|
|
|
|
namespace: "{{system_namespace}}"
|
|
|
|
state: absent
|
|
|
|
when: inventory_hostname == groups['kube-master'][0] and canal_node_manifest.changed
|
|
|
|
|
2016-11-03 15:57:11 +00:00
|
|
|
- name: Start flannel and calico-node
|
|
|
|
run_once: true
|
|
|
|
kube:
|
|
|
|
name: "canal-node"
|
|
|
|
kubectl: "{{bin_dir}}/kubectl"
|
2016-12-13 10:43:06 +00:00
|
|
|
filename: "{{kube_config_dir}}/canal-node.yaml"
|
2016-11-03 15:57:11 +00:00
|
|
|
resource: "ds"
|
2016-12-13 10:43:06 +00:00
|
|
|
namespace: "{{system_namespace}}"
|
2017-02-08 14:13:17 +00:00
|
|
|
state: "{{ item | ternary('latest','present') }}"
|
|
|
|
with_items: "{{ canal_node_manifest.changed }}"
|
|
|
|
|