summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/kubernetes/roles/2flannel-apps
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles/2flannel-apps')
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml
new file mode 100644
index 00000000..a7ff10e2
--- /dev/null
+++ b/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml
@@ -0,0 +1,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