aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-08-06 02:37:33 -0400
committerbaigk <baiguoku@huawei.com>2015-08-09 22:47:56 -0400
commit87612abc0e24cafd89a49e350165b08fe1608233 (patch)
tree07b156c0268fd189f92e8a0730118edc51b8073f /deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
parent5aedf594112c0749b6e9039d15b9fe70d210a942 (diff)
support deployment openstack juno with ansible for compass in centos7.1
JIRA: COMPASS-6 Change-Id: I8ef865e8acfe29c3ff5c7e9030e4cebabed3457b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml')
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml18
1 files changed, 9 insertions, 9 deletions
diff --git a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
index d727b66b..3700bcdd 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml
@@ -2,24 +2,24 @@
- include_vars: "{{ ansible_os_family }}.yml"
- name: install cinder-volume and lvm2 packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: packages | union(packages_noarch)
- name: generate cinder volume service list
shell: echo {{ item }} >> /opt/service
- with_items: services
+ with_items: services | union(services_noarch)
- name: check if physical device exists
stat: path={{ physical_device }}
- register: st
+ register: status
-- name: repace physical_device if st is false
+- name: replace physical_device if st is false
local_action: copy src=loop.yml dest=/tmp/loop.yml
- when: st.stat.exists == False
+ when: status.stat.exists == False
- name: load loop.yml
include_vars: /tmp/loop.yml
- when: st.stat.exists == False
+ when: status.stat.exists == False
- name: check if cinder-volumes is mounted
shell: ls /mnt
@@ -35,7 +35,7 @@
when: cindervolumes.stdout != 'cinder-volumes'
- name: get first lo device
- shell: ls /dev/loop* | egrep 'loop[0-9]+'|sed -n 1p
+ shell: losetup -f
register: first_lo
when: cindervolumes.stdout != 'cinder-volumes'
@@ -51,4 +51,4 @@
template: src=cinder.conf dest=/etc/cinder/cinder.conf
backup=yes
notify:
- - restart cinder-volume
+ - restart cinder-volume services