summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2018-02-22 00:38:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-22 00:38:54 +0000
commitcfafdfa4bad20b380e542e6b2d4e240b2a931097 (patch)
tree6db62ef1ea06d06dd90927f482615b636bd5d004 /deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml
parentc8d1b105be71eb831a7068c2b7d5e1530d590a11 (diff)
parent098208121bba3ef6d576976c2e975c56f89ae901 (diff)
Merge "add a multus with 2 fannel interfaces installation"
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles/2flannel-apps/tasks/main.yml')
-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