summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/kubernetes/roles/sriov-apps/tasks/main.yml
blob: 662fa7bf30d9425c927fa7987eb7c6c1fbdc002d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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]