vino/vino-builder/assets/playbooks/roles/libvirt/tasks/create-storage.yaml

26 lines
656 B
YAML

# Facts will be available as 'ansible_libvirt_pools'
- name: initially gather facts on existing virsh pool
virt_pool:
command: facts
uri: "{{ libvirt_uri }}"
- name: create directory for vino pool
file:
state: directory
# TODO remove this hardcode, define vino storage variables in vino CR
path: "/var/lib/libvirt/vino-pool"
mode: 0755
- name: define storage the storage pool
virt_pool:
state: present
name: "{{ item.name }}"
uri: "{{ libvirt_uri }}"
xml: "{{ item.libvirtTemplate }}"
- name: activate the storage pool
virt_pool:
state: active
name: "{{ item.name }}"
uri: "{{ libvirt_uri }}"