diff options
author | leonwang <wanghui71@huawei.com> | 2018-03-15 08:25:05 +0000 |
---|---|---|
committer | leonwang <wanghui71@huawei.com> | 2018-03-15 08:39:22 +0000 |
commit | 6bc7e08cc5d80941c80e8d36d3a2b1373f147a05 (patch) | |
tree | 3e236cfc1f4ce35ad8ab09843010d16010da4054 /ci/ansible/roles/osdsdock/scenarios/lvm.yml | |
parent | 6018fcdd41c2074b2c94d8033f1434be028b054b (diff) |
Merge nbp installation into opensds ansible script
In this update, the nbp-ansible is removed from stor4nfv repo and
all code has been merged into ansible repo. Besides, the latest
update reduce a lot of work to download and build opensds source
code. And some installation docs are also updated.
Remove license statement for the moment.
Change-Id: Ib8504d96e2d41e1c3ab7e0c94689111679d56abd
Signed-off-by: leonwang <wanghui71@huawei.com>
Diffstat (limited to 'ci/ansible/roles/osdsdock/scenarios/lvm.yml')
-rw-r--r--[-rwxr-xr-x] | ci/ansible/roles/osdsdock/scenarios/lvm.yml | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/ci/ansible/roles/osdsdock/scenarios/lvm.yml b/ci/ansible/roles/osdsdock/scenarios/lvm.yml index 5847aa3..743fe3b 100755..100644 --- a/ci/ansible/roles/osdsdock/scenarios/lvm.yml +++ b/ci/ansible/roles/osdsdock/scenarios/lvm.yml @@ -1,27 +1,20 @@ ---- -- name: install lvm2 external package when lvm backend enabled - apt: - name: lvm2 - -- name: copy opensds lvm backend file if specify lvm backend - copy: - src: ../../../group_vars/lvm/lvm.yaml - dest: "{{ lvm_config_path }}" - -- name: check if physical volume existed - shell: pvdisplay {{ pv_device }} - ignore_errors: yes - register: pv_existed - -- name: create a physical volume - shell: pvcreate {{ pv_device }} - when: pv_existed is undefined or pv_existed.rc != 0 - -- name: check if volume group existed - shell: vgdisplay {{ vg_name }} - ignore_errors: yes - register: vg_existed - -- name: create a volume group - shell: vgcreate {{ vg_name }} {{ pv_device }} - when: vg_existed is undefined or vg_existed.rc != 0 +---
+- name: install lvm2 external package when lvm backend enabled
+ apt:
+ name: lvm2
+
+- name: copy opensds lvm backend file if specify lvm backend
+ copy:
+ src: ../../../group_vars/lvm/lvm.yaml
+ dest: "{{ lvm_config_path }}"
+
+- name: check if volume group existed
+ shell: vgdisplay {{ vg_name }}
+ ignore_errors: yes
+ register: vg_existed
+
+- name: create a volume group and initialize it
+ lvg:
+ vg: "{{ vg_name }}"
+ pvs: "{{ pv_devices }}"
+ when: vg_existed is undefined or vg_existed.rc != 0
|