From a005a8f32c7deb571a5b95dfad3d889f132ac925 Mon Sep 17 00:00:00 2001 From: Grzegorz Koper Date: Fri, 10 May 2024 11:29:00 +0200 Subject: [PATCH] [SRIOV/IOMMU]Fixing conditional to enable for variance in /proc/cpuinfo outputs [SRIOV] Sytanx fix --- roles/iommu/tasks/main.yml | 2 +- roles/sriov/tasks/config.yml | 2 +- roles/sriov/tasks/main.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/iommu/tasks/main.yml b/roles/iommu/tasks/main.yml index 4ca9872..1129a27 100644 --- a/roles/iommu/tasks/main.yml +++ b/roles/iommu/tasks/main.yml @@ -7,7 +7,7 @@ - intel_iommu=on kernel_cmdline_remove: # noqa: var-naming[no-role-prefix] - ^intel_iommu= - when: "'Intel' in ansible_facts.processor.0" + when: ansible_facts.processor | select('search','Intel') - name: Set iommu=pt ansible.builtin.include_role: diff --git a/roles/sriov/tasks/config.yml b/roles/sriov/tasks/config.yml index 9cdf198..357dfaf 100644 --- a/roles/sriov/tasks/config.yml +++ b/roles/sriov/tasks/config.yml @@ -26,7 +26,7 @@ kernel_cmdline_remove: # noqa var-naming[no-role-prefix] - ^intel_iommu= kernel_restart_handler: "{{ sriov_restart_handler }}" - when: "'Intel' in ansible_facts.processor.0" + when: ansible_facts.processor | select('search','Intel') - name: Set iommu=pt ansible.builtin.include_role: diff --git a/roles/sriov/tasks/main.yml b/roles/sriov/tasks/main.yml index 4115556..5067839 100644 --- a/roles/sriov/tasks/main.yml +++ b/roles/sriov/tasks/main.yml @@ -1,3 +1,3 @@ --- - name: Include action tasks - ansible.builtin._include: "{{ sriov_action | default('all') }}.yml" + ansible.builtin.include: "{{ sriov_action | default('all') }}.yml"