Commit 89051cd0 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

playbook: prevent kvm_intel from being loaded by udev.

When module was loaded by udev, there wasn't the parameter nested=Y

/reviewed-on nexedi/slapos.package!100
parent 4ada82f8
--- ---
- modprobe: name=kvm_intel state=present params='nested=Y' - name: Insert kvm_intel module with parameter nested=Y
modprobe: name=kvm_intel state=present params='nested=Y'
ignore_errors: True ignore_errors: True
- name: Prevent kvm_intel module from being loaded by udev
lineinfile:
dest: /etc/modprobe.d/blacklist.conf
line: "blacklist kvm_intel"
state: present
create: yes
- pause: seconds=2 - pause: seconds=2
- stat: path=/dev/kvm - stat: path=/dev/kvm
register: dev_kvm register: dev_kvm
- name: Set 666 on /dev/kvm - name: Set 666 on /dev/kvm
shell: chmod 666 /dev/kvm shell: chmod 666 /dev/kvm
when: dev_kvm.stat.exists == True when: dev_kvm.stat.exists == True
- modprobe: name=vhost-net state=present - name: Insert vhost-net module
modprobe: name=vhost-net state=present
ignore_errors: True ignore_errors: True
- pause: seconds=2 - pause: seconds=2
- stat: path=/dev/vhost-net - stat: path=/dev/vhost-net
register: dev_vhost register: dev_vhost
- name: Set 666 on /dev/vhost-net - name: Set 666 on /dev/vhost-net
shell: chmod 666 /dev/vhost-net shell: chmod 666 /dev/vhost-net
when: dev_vhost.stat.exists == True when: dev_vhost.stat.exists == True
- name: Check if configuration exists already - name: Check if configuration exists already
...@@ -31,4 +40,4 @@ ...@@ -31,4 +40,4 @@
- name: Force create_tap to be true - name: Force create_tap to be true
shell: sed -i 's/^create_tap =.*/create_tap = True/' /etc/opt/slapos/slapos.cfg shell: sed -i 's/^create_tap =.*/create_tap = True/' /etc/opt/slapos/slapos.cfg
when: xslapos_cfg.stat.exists == True when: xslapos_cfg.stat.exists == True
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment