Teardown libvirt pool: fix pool file removal

Change-Id: Iefe8278666d3e991638b11985e2e879518060a68
This commit is contained in:
Gabriele Cerami 2016-09-21 23:36:43 +02:00
parent d91cbb5649
commit d8ce554db4

View File

@ -132,14 +132,14 @@
environment:
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
- name: Get UID for volume pool
- name: Get UID of pool user
command: id -u "{{ ansible_user_id }}"
register: pool_uid
changed_when: false
when: pool_check|success
- name: Destroy volume pool
- name: Destroy pool definition file
file:
path: "/run/user/{{ pool_uid.stdout }}/libvirt/storage/run/{{ libvirt_volume_pool }}"
path: "/run/user/{{ pool_uid.stdout }}/libvirt/storage/run/{{ libvirt_volume_pool }}.xml"
state: absent
when: pool_check|success