kvm-host: Restrict permissions to KVM image directories
This commit is contained in:
parent
c5c5707f67
commit
8a7ad72442
1 changed files with 21 additions and 0 deletions
|
@ -8,6 +8,27 @@
|
|||
- qemu-kvm
|
||||
- virt-install
|
||||
|
||||
- name: create data directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: 0770
|
||||
owner: root
|
||||
group: qemu
|
||||
with_items:
|
||||
- /export/libvirt
|
||||
- /export/libvirt/hdd
|
||||
- /export/libvirt/ssd
|
||||
|
||||
- name: link data directory
|
||||
file:
|
||||
src: /export/libvirt
|
||||
dest: /srv/libvirt
|
||||
state: link
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
follow: false
|
||||
|
||||
- name: enable libvirt service
|
||||
service:
|
||||
name: libvirtd
|
||||
|
|
Loading…
Add table
Reference in a new issue