Merge "Check for existence of /dev/kvm"
This commit is contained in:
commit
2a7284e523
@ -76,6 +76,17 @@
|
|||||||
tags:
|
tags:
|
||||||
- nova-kvm
|
- nova-kvm
|
||||||
- nova-kvm-container-devices
|
- nova-kvm-container-devices
|
||||||
|
- name: Check if kvm device exists
|
||||||
|
stat:
|
||||||
|
path: /dev/kvm
|
||||||
|
delegate_to: "{{ physical_host }}"
|
||||||
|
register: kvm_device
|
||||||
|
when:
|
||||||
|
- "inventory_hostname in groups['nova_compute']"
|
||||||
|
- "not is_metal | bool"
|
||||||
|
tags:
|
||||||
|
- nova-kvm
|
||||||
|
- nova-kvm-container-devices
|
||||||
- name: Add kvm device to the compute
|
- name: Add kvm device to the compute
|
||||||
shell: |
|
shell: |
|
||||||
lxc-device -n {{ container_name }} add /dev/kvm /dev/kvm
|
lxc-device -n {{ container_name }} add /dev/kvm /dev/kvm
|
||||||
@ -87,7 +98,7 @@
|
|||||||
when:
|
when:
|
||||||
- "inventory_hostname in groups['nova_compute']"
|
- "inventory_hostname in groups['nova_compute']"
|
||||||
- "not is_metal | bool"
|
- "not is_metal | bool"
|
||||||
- "nova_virt_type == 'kvm'"
|
- kvm_device.stat.ischr is defined and kvm_device.stat.ischr
|
||||||
tags:
|
tags:
|
||||||
- nova-kvm
|
- nova-kvm
|
||||||
- nova-kvm-container-devices
|
- nova-kvm-container-devices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user