aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/kubernetes/roles/sriov-apps/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/kubernetes/roles/sriov-apps/tasks/main.yml')
-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]