AETHER-1839 initial sriov role
Change-Id: I54af5c451a18d160d3799e9264ef5af9cfa19d36
diff --git a/handlers/main.yml b/handlers/main.yml
new file mode 100644
index 0000000..e699bf5
--- /dev/null
+++ b/handlers/main.yml
@@ -0,0 +1,27 @@
+---
+# 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