c12s-kubespray/roles/kubernetes-apps/ansible/tasks/calico-policy-controller.yml
Aleksandr Didenko 90bae73e36 Fix idempotency of calico-policy-controller rs
We need to specify kube resource type and name in order to avoid
playbook errors related to k8s resource duplication.
2016-11-08 12:59:18 +01:00

13 lines
485 B
YAML

- name: Write calico-policy-controller yaml
template: src=calico-policy-controller.yml.j2 dest=/etc/kubernetes/calico-policy-controller.yml
when: inventory_hostname == groups['kube-master'][0]
- name: Start of Calico policy controller
kube:
name: "calico-policy-controller"
kubectl: "{{bin_dir}}/kubectl"
filename: "/etc/kubernetes/calico-policy-controller.yml"
namespace: "kube-system"
resource: "rs"
when: inventory_hostname == groups['kube-master'][0]