aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml
blob: a7ff10e28ef2e5de32c061eaac4b7514f7bf6863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- name: "2Flannel | Create ServiceAccount ClusterRole and ClusterRoleBinding"
  command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/cni-2flannel-rbac.yml"
  run_once: true
  when: rbac_enabled and two_flannel_rbac_manifest.changed

- name: 2Flannel | Start Resources
  kube:
    name: "kube-2flannel"
    kubectl: "{{ bin_dir }}/kubectl"
    filename: "{{ kube_config_dir }}/cni-2flannel.yml"
    resource: "ds"
    namespace: "{{system_namespace}}"
    state: "{{ item | ternary('latest','present') }}"
  with_items: "{{ two_flannel_manifest.changed }}"
  when: inventory_hostname == groups['kube-master'][0]

- name: 2Flannel | Wait for flannel subnet.env file presence
  wait_for:
    path: /run/2flannel/networks/subnet1.env
    delay: 5
    timeout: 600