2017-08-24 09:09:52 +00:00
|
|
|
---
|
2017-09-04 08:29:40 +00:00
|
|
|
- name: Set cert dir
|
|
|
|
set_fact:
|
2016-12-30 12:47:12 +00:00
|
|
|
calico_cert_dir: "{{ canal_cert_dir }}"
|
2018-08-23 14:17:18 +00:00
|
|
|
when:
|
|
|
|
- kube_network_plugin == 'canal'
|
2017-10-05 07:43:04 +00:00
|
|
|
tags:
|
|
|
|
- facts
|
|
|
|
- canal
|
2016-12-30 12:47:12 +00:00
|
|
|
|
2017-11-28 12:01:30 +00:00
|
|
|
- name: Create calico-kube-controllers manifests
|
2017-02-17 21:22:34 +00:00
|
|
|
template:
|
2017-09-04 08:29:40 +00:00
|
|
|
src: "{{item.file}}.j2"
|
|
|
|
dest: "{{kube_config_dir}}/{{item.file}}"
|
|
|
|
with_items:
|
2017-11-28 12:01:30 +00:00
|
|
|
- {name: calico-kube-controllers, file: calico-kube-controllers.yml, type: deployment}
|
|
|
|
- {name: calico-kube-controllers, file: calico-kube-sa.yml, type: sa}
|
|
|
|
- {name: calico-kube-controllers, file: calico-kube-cr.yml, type: clusterrole}
|
|
|
|
- {name: calico-kube-controllers, file: calico-kube-crb.yml, type: clusterrolebinding}
|
|
|
|
register: calico_kube_manifests
|
2018-08-23 14:17:18 +00:00
|
|
|
when:
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
|
|
|
- rbac_enabled or item.type not in rbac_resources
|
2016-10-10 14:09:50 +00:00
|
|
|
|
2017-11-28 12:01:30 +00:00
|
|
|
- name: Start of Calico kube controllers
|
2016-10-10 14:09:50 +00:00
|
|
|
kube:
|
2017-09-04 08:29:40 +00:00
|
|
|
name: "{{item.item.name}}"
|
2018-03-30 11:29:13 +00:00
|
|
|
namespace: "kube-system"
|
2016-10-10 14:09:50 +00:00
|
|
|
kubectl: "{{bin_dir}}/kubectl"
|
2017-09-04 08:29:40 +00:00
|
|
|
resource: "{{item.item.type}}"
|
|
|
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
2017-09-05 05:23:12 +00:00
|
|
|
state: "latest"
|
2018-08-23 14:17:18 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ calico_kube_manifests.results }}"
|
|
|
|
when:
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2018-10-16 22:33:30 +00:00
|
|
|
- not item is skipped
|
2018-12-04 18:35:44 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.item.file }}"
|