summaryrefslogtreecommitdiffstats
path: root/lib/ansible/playbooks/deploy_dependencies.yml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/playbooks/deploy_dependencies.yml')
-rw-r--r--lib/ansible/playbooks/deploy_dependencies.yml28
1 files changed, 17 insertions, 11 deletions
diff --git a/lib/ansible/playbooks/deploy_dependencies.yml b/lib/ansible/playbooks/deploy_dependencies.yml
index d2749675..545ee33d 100644
--- a/lib/ansible/playbooks/deploy_dependencies.yml
+++ b/lib/ansible/playbooks/deploy_dependencies.yml
@@ -54,18 +54,24 @@
name: default
autostart: yes
state: active
- - lineinfile:
- path: /etc/modprobe.d/kvm_intel.conf
- line: 'options kvm-intel nested=1'
- create: yes
- when: ansible_architecture == "x86_64"
- - modprobe:
- name: "{{ item }}"
- state: present
- with_items:
- - kvm
- - kvm_intel
+ - shell: cat /sys/module/kvm_intel/parameters/nested || true
+ register: nested_result
when: ansible_architecture == "x86_64"
+ - name: reload kvm_intel
+ block:
+ - lineinfile:
+ path: /etc/modprobe.d/kvm_intel.conf
+ line: 'options kvm-intel nested=1'
+ create: yes
+ - modprobe:
+ name: kvm_intel
+ state: absent
+ - modprobe:
+ name: kvm_intel
+ state: present
+ when:
+ - ansible_architecture == "x86_64"
+ - "'Y' not in nested_result.stdout"
- name: Generate SSH key for root if missing
shell: test -e ~/.ssh/id_rsa || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
- name: Check that /u/l/python3.4/site-packages/virtualbmc/vbmc.py exists