diff options
author | Tim Rozet <trozet@redhat.com> | 2017-12-02 19:33:01 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-12-02 19:33:01 +0000 |
commit | df86bfbebabaf5f49dff2b123da8872c7aaa4bf1 (patch) | |
tree | e36fba3777e4b6045b9edad1eb7dbc20f16a23bf /lib/ansible | |
parent | 5a6ac42f278fbe793375c03462d74f80c1527a5a (diff) | |
parent | 8af37f28bcd5bf990ef501601ec6998b8f9b8fcc (diff) |
Merge "Fix nested kvm detection and enablement"
Diffstat (limited to 'lib/ansible')
-rw-r--r-- | lib/ansible/playbooks/deploy_dependencies.yml | 28 |
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 |