---
# Ensure this file is written before kvm_intel or kvm_amd module is loaded
- name: enable nested kvm
  template: src=etc/modprobe.d/kvm-nested.conf dest=/etc/modprobe.d/kvm-nested.conf owner=root group=root mode=0644

- action: apt pkg={{ item }}
  with_items:
    - libvirt-bin
    - python-libvirt
    - kvm
    - open-iscsi

- name: ensure kvm is supported by cpu and enabled in bios
  command: kvm-ok
  when: "'{{ nova_common_libvirt_type }}' == 'kvm'"
  changed_when: False

- user: name=nova groups=libvirtd
- file: dest=/var/lib/nova/instances state=directory owner=nova
- template: src=etc/init/nova-compute.conf dest=/etc/init/nova-compute.conf owner=root group=root mode=0644
- service: name=nova-compute state=started

---
# Ensure this file is written before kvm_intel or kvm_amd module is loaded
- name: enable nested kvm
  template: src=etc/modprobe.d/kvm-nested.conf dest=/etc/modprobe.d/kvm-nested.conf owner=root group=root mode=0644

- action: apt pkg={{ item }}
  with_items:
    - libvirt-bin
    - python-libvirt
    - kvm
    - open-iscsi

- name: ensure kvm is supported by cpu and enabled in bios
  command: kvm-ok
  when: "'{{ nova_common_libvirt_type }}' == 'kvm'"
  changed_when: False

- file: dest=/var/lib/nova/instances state=directory owner=nova
- template: src=etc/init/nova-compute.conf dest=/etc/init/nova-compute.conf owner=root group=root mode=0644
- service: name=nova-compute state=started

Remove duplicate definition of nova user.
Remove duplicate definition of nova user.
