diff options
-rwxr-xr-x | deploy/adapters/ansible/roles/storage/files/storage | 3 | ||||
-rwxr-xr-x | deploy/adapters/ansible/roles/storage/tasks/main.yml | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/storage/files/storage b/deploy/adapters/ansible/roles/storage/files/storage new file mode 100755 index 00000000..9ef9a65b --- /dev/null +++ b/deploy/adapters/ansible/roles/storage/files/storage @@ -0,0 +1,3 @@ +#! /bin/bash +loop_dev=`sh /opt/setup_storage/losetup.sh` +vgcreate --force storage-volumes $loop_dev diff --git a/deploy/adapters/ansible/roles/storage/tasks/main.yml b/deploy/adapters/ansible/roles/storage/tasks/main.yml index c7cb86f9..0a27be5d 100755 --- a/deploy/adapters/ansible/roles/storage/tasks/main.yml +++ b/deploy/adapters/ansible/roles/storage/tasks/main.yml @@ -25,4 +25,26 @@ tags: - storage +- name: make setup_storage directory + file: path=/opt/setup_storage state=directory mode=0755 + tags: + - storage + +- name: copy setup storage scripts + copy: src={{ item }} dest=/opt/setup_storage mode=0755 + with_items: + - losetup.sh + tags: + - storage + +- name: set autostart file + copy: src=storage dest=/etc/init.d/storage mode=0755 + tags: + - storage + +- name: enable service + service: name=storage enabled=yes + tags: + - storage + - meta: flush_handlers |