---
# This is an example playbook to execute Ansible tests.

- name: Verify
  hosts: all
  gather_facts: false
  tasks:
  - name: pcan module loaded
    shell: lsmod | grep ^pcan
    register: result
    changed_when: false
    failed_when: result.rc != 0

  - name: pcan version 8.10.2
    shell: cat /sys/class/pcan/version
    register: result
    changed_when: false
    failed_when: '"8.10.2" not in result.stdout'

  - name: grub settings pcie_aspm=off
    shell: cat /etc/default/grub|grep pcie_aspm=off
    register: result
    changed_when: false
    failed_when: result.rc != 0
