summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/kubernetes/roles/sriov-apps
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2018-03-09 03:51:29 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-03-09 03:51:29 +0000
commit6bc387014a355483900cd5542961096e8b307cf4 (patch)
treeafacb1701655cc058316984e46eb52a138c23d83 /deploy/adapters/ansible/kubernetes/roles/sriov-apps
parentba134f4d524bd885cd40c346f32fcbfb5e99d4c5 (diff)
parent3ad4238fbf8a8043cfbe6623b22b8d16e82a408f (diff)
Merge "add a multus with sriov interfaces installation"
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles/sriov-apps')
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/sriov-apps/tasks/main.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/sriov-apps/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/sriov-apps/tasks/main.yml
new file mode 100644
index 00000000..662fa7bf
--- /dev/null
+++ b/deploy/adapters/ansible/kubernetes/roles/sriov-apps/tasks/main.yml
@@ -0,0 +1,20 @@
+# Copyright (C) 2018, ARM Limited and contributors.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+---
+- name: "Sriov | Create ServiceAccount ClusterRole and ClusterRoleBinding"
+ command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/cni-sriov-rbac.yml"
+ run_once: true
+ when: rbac_enabled and sriov_rbac_manifest.changed
+
+- name: Sriov | Create Network Resources
+ kube:
+ name: "kube-sriov"
+ kubectl: "{{ bin_dir }}/kubectl"
+ filename: "{{ kube_config_dir }}/cni-sriov.yml"
+ namespace: "{{system_namespace}}"
+ state: "{{ item | ternary('latest','present') }}"
+ with_items: "{{ sriov_manifest.changed }}"
+ when: inventory_hostname == groups['kube-master'][0]