load virtio kernel modules by default

Change-Id: Ibef9b6ff273784566e6c7b479cacd2d2dd97fe0d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-07-28 10:07:43 -05:00 committed by Kevin Carter (cloudnull)
parent a94f0a9026
commit 7917eb144d

View File

@ -207,6 +207,16 @@
when: when:
- virsh_data_volume.rc != 0 - virsh_data_volume.rc != 0
- name: Load virtio kernel modules
shell: |
for mod in $(find /lib/modules/$(uname -r) -type f -name 'virtio*.ko'); do
module=$(echo $(basename $mod) | sed 's/\.ko//g')
modprobe ${module}
if ! grep ${module} /etc/modules; then
echo ${module} | tee -a /etc/modules
fi
done
vars_files: vars_files:
- vars/main.yml - vars/main.yml
tags: tags: