zuul-airship-roles/roles/libvirt-pool/tasks/create.yml
Doug Aaser f3cbed1d96 [AIR-209] Remove privilege escalation
This PS removes privilege escalation from the roles so that these roles
can be used in a developer environment

Change-Id: I44ddc18532ee75b0d398896d470ecf949ad4496a
2020-01-21 12:11:16 -05:00

24 lines
603 B
YAML

---
- name: Ensure libvirt storage pools are defined
virt_pool:
name: "{{ libvirt_pool.name }}"
command: define
xml: "{{ libvirt_pool.xml | default(libvirt_pool_template_default) }}"
register: pool_info
- name: Ensure libvirt storage pools are built
virt_pool:
name: "{{ libvirt_pool.name }}"
command: build
when: pool_info.changed
- name: Ensure libvirt storage pools are active
virt_pool:
name: "{{ libvirt_pool.name }}"
state: active
- name: Ensure libvirt storage pools are started on boot
virt_pool:
name: "{{ libvirt_pool.name }}"
autostart: yes