solar/slave_cinder.yml
2015-07-22 13:50:54 +00:00

15 lines
412 B
YAML

---
- hosts: all
sudo: yes
tasks:
- apt: name=lvm2 state=present
- command: sudo truncate -s 10G /root/cinder.img creates=/root/cinder.img
- shell: sudo losetup -a|grep cinder
register: loop_created
ignore_errors: True
- command: sudo losetup /dev/loop0 /root/cinder.img
when: loop_created|failed
- lvg: vg=cinder-volumes pvs=/dev/loop0
when: loop_created|failed