Create cinde-volume on all slaves.
This commit is contained in:
parent
4957dd9d30
commit
dad6d3ffab
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -16,7 +16,7 @@ slave_script = <<SCRIPT
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y install python-pip python-dev
|
apt-get -y install python-pip python-dev
|
||||||
pip install ansible
|
pip install ansible
|
||||||
ansible-playbook -i "localhost," -c local /vagrant/main.yml /vagrant/docker.yml /vagrant/slave.yml
|
ansible-playbook -i "localhost," -c local /vagrant/main.yml /vagrant/docker.yml /vagrant/slave.yml /vagrant/slave_cinder.yml
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
master_celery = <<SCRIPT
|
master_celery = <<SCRIPT
|
||||||
|
14
slave_cinder.yml
Normal file
14
slave_cinder.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- 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
|
Loading…
Reference in New Issue
Block a user