AETHER-1839 initial sriov role
Change-Id: I54af5c451a18d160d3799e9264ef5af9cfa19d36
diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml
new file mode 100644
index 0000000..faf1243
--- /dev/null
+++ b/molecule/default/verify.yml
@@ -0,0 +1,47 @@
+---
+# sriov molecule/default/verify.yml
+#
+# SPDX-FileCopyrightText: © 2021 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
+- name: Verify
+ hosts: all
+ tasks:
+ - name: Gather service facts
+ service_facts:
+
+ - name: Verify sriov.service is installed
+ assert:
+ that: "'{{ item }}' in ansible_facts.services"
+ with_items:
+ - sriov.service
+
+ - name: Verify sriov.service is loaded and configured correctly
+ # noqa 303
+ command: "systemctl status sriov.service"
+ register: cmdline
+ changed_when: false
+ failed_when: item not in cmdline.stdout
+ with_items:
+ - loaded
+ - Resetting PF eth0
+
+ - name: Verify kernel boot parameters
+ command: "cat /proc/cmdline"
+ register: cmdline
+ changed_when: false
+ failed_when: item not in cmdline.stdout
+ with_items:
+ - intel_iommu=on
+ - transparent_hugepage=never
+ - default_hugepagesz=1G
+ - hugepagesz=1G hugepages=32
+
+ - name: Verify vfio-pci module is loaded
+ shell: "set -o pipefail && lsmod | grep vfio_pci > /dev/null"
+ args:
+ executable: /bin/bash
+ register: vfio_pci
+ changed_when: vfio_pci.rc != 0
+ failed_when: vfio_pci.rc != 0
+ when: ansible_kernel is version('5.4','<')