Volume group changes

- fix path
- remove file at the end
This commit is contained in:
Łukasz Oleś 2015-09-03 19:56:44 +00:00
parent a127a561fa
commit e76aa4e849

View File

@ -4,11 +4,13 @@
- name: remove VG - name: remove VG
lvg: vg={{name}} state=absent force=yes lvg: vg={{name}} state=absent force=yes
- name: find loop device - name: find loop device
shell: losetup -a|grep "/root/cinder.img"|awk -F':' '{print $1}' shell: losetup -a|grep "{{path}}"|awk -F':' '{print $1}'
register: loop_device register: loop_device
- name: if loop device exists, delete it - name: if loop device exists, delete it
command: sudo losetup -d {% raw %}{{item}}{% endraw %} command: sudo losetup -d {% raw %}{{item}}{% endraw %}
when: loop_device|success when: loop_device|success
with_items: loop_device.stdout_lines with_items: loop_device.stdout_lines
- name: remove file
file: path={{path}} state=absent