From 87612abc0e24cafd89a49e350165b08fe1608233 Mon Sep 17 00:00:00 2001 From: baigk Date: Thu, 6 Aug 2015 02:37:33 -0400 Subject: support deployment openstack juno with ansible for compass in centos7.1 JIRA: COMPASS-6 Change-Id: I8ef865e8acfe29c3ff5c7e9030e4cebabed3457b Signed-off-by: baigk --- .../ansible/roles/cinder-volume/tasks/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml') 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 -- cgit 1.2.3-korg