| --- |
| # sriov handlers/main.yml |
| # |
| # SPDX-FileCopyrightText: © 2021 Open Networking Foundation <support@opennetworking.org> |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| - name: enable sriov.service |
| systemd: |
| name: sriov |
| daemon_reload: true |
| enabled: true |
| |
| - name: update grub |
| command: update-grub |
| notify: reboot |
| |
| - name: reboot |
| reboot: |
| test_command: "systemctl show -p LoadState sriov.service | grep loaded" |
| notify: ensure vfs |
| |
| - name: ensure vfs |
| command: "cat /sys/class/net/{{ sriov_pf_name }}/device/sriov_numvfs" |
| register: confirm_vfs |
| changed_when: confirm_vfs.stdout | int == 0 |
| failed_when: confirm_vfs.stdout | int == 0 |
| when: molecule_handler_notest is not defined |