5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 - name: Set sriov config dir variable
19 sriov_conf_dir: "/etc/sriov"
21 - name: ensure sriov config dir exists
23 path: "{{ sriov_conf_dir }}"
28 - name: Create /etc/sriov/sriov.conf file
31 dest: "{{ sriov_conf_dir }}/sriov.conf"
35 - name: Configure VF count
36 script: configure_vf_count.sh
37 register: configure_vf_count_result
38 failed_when: not (configure_vf_count_result.rc == 0 or configure_vf_count_result.rc == 2)
39 changed_when: configure_vf_count_result.rc == 2
41 - debug: var=configure_vf_count_result.stdout_lines
42 when: configure_vf_count_result.rc != 0
44 - debug: var=configure_vf_count_result.stderr_lines
45 when: configure_vf_count_result.rc != 0