Configure dracut multipath module for diskless nodes
Configure dracut multipath module for diskless nodes in order to allow initramfs to load multipath module in order to allow bootable device to be multipathed. Change-Id: If346b7fcb2362a7454652a22d4a1f96f7f5e9dca
This commit is contained in:
parent
8eed51fd2b
commit
3f7d8ced19
|
@ -24,3 +24,4 @@ tripleo_multipathd_enable: true
|
|||
tripleo_multipathd_find_multipaths: true
|
||||
tripleo_multipathd_skip_kpartx: true
|
||||
tripleo_multipathd_user_friendly_names: false
|
||||
tripleo_boot_from_multipath_device: false
|
||||
|
|
|
@ -67,3 +67,26 @@
|
|||
path: /etc/multipath
|
||||
state: directory
|
||||
setype: container_file_t
|
||||
|
||||
- name: Configure multipath dracut module
|
||||
when:
|
||||
- tripleo_boot_from_multipath_device | bool
|
||||
block:
|
||||
- name: Check if multipath module is already configured in dracut
|
||||
lineinfile:
|
||||
state: absent
|
||||
path: "/etc/dracut.conf"
|
||||
regexp: "add_dracutmodules.*multipath.*"
|
||||
check_mode: true
|
||||
changed_when: false
|
||||
register: check
|
||||
- name: Add multipath dracut module if it's missing and refresh dracut
|
||||
when: check.found == 0
|
||||
block:
|
||||
- name: Add multipath dracut module if it's missing
|
||||
lineinfile:
|
||||
state: present
|
||||
path: "/etc/dracut.conf"
|
||||
line: 'add_dracutmodules+="multipath"'
|
||||
- name: Refresh dracut
|
||||
shell: dracut -f
|
||||
|
|
Loading…
Reference in New Issue