aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2019-03-07 16:05:42 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-03-07 16:05:42 +0000
commit02ff2823b02573a38adc79a3af658287fca62580 (patch)
treea6909c66614f363a076b0b62cde3ed4706b43c7e /ansible/roles
parent2f225203aa05e1266b8f4f81bd950d62ef0105ec (diff)
parent60d07cf9a6ab763852d3c1db519aab0e8e3394fe (diff)
Merge "Update grub in enable_iommu_on_boot when needed"
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/enable_iommu_on_boot/tasks/main.yml37
1 files changed, 19 insertions, 18 deletions
diff --git a/ansible/roles/enable_iommu_on_boot/tasks/main.yml b/ansible/roles/enable_iommu_on_boot/tasks/main.yml
index 188b32915..2772a5d52 100644
--- a/ansible/roles/enable_iommu_on_boot/tasks/main.yml
+++ b/ansible/roles/enable_iommu_on_boot/tasks/main.yml
@@ -54,25 +54,26 @@
- not is_nsb_iommu_role.changed
- is_iommu.changed
- - name: Add IOMMU when it is not set
- lineinfile:
- path: "{{ grub_file }}"
- regexp: "{{ iommu_help_string }}"
- line: '{{ enable_iommu }}" {{ iommu_help_string }}'
+ - block:
+ - name: Add IOMMU when it is not set
+ lineinfile:
+ path: "{{ grub_file }}"
+ regexp: "{{ iommu_help_string }}"
+ line: '{{ enable_iommu }}" {{ iommu_help_string }}'
+
+ - name: find boot grub.cfg
+ find:
+ paths: /boot
+ file_type: file
+ patterns: 'grub*.cfg'
+ recurse: yes
+ register: grub_files
+
+ - include: manual_modify_grub.yml
+ # only tested on Ubuntu, kernel line is probably different on other distros
+ with_items: "{{ grub_files.files }}"
when:
+ - ansible_distribution == "Ubuntu"
- not is_nsb_iommu_role.changed
- not is_iommu.changed
-
- - name: find boot grub.cfg
- find:
- paths: /boot
- file_type: file
- patterns: 'grub*.cfg'
- recurse: yes
- register: grub_files
-
- - include: manual_modify_grub.yml
- # only tested on Ubuntu, kernel line is probably different on other distros
- with_items: "{{ grub_files.files }}"
- when: ansible_distribution == "Ubuntu"
when: iommu_boot_params is defined