diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml')
-rw-r--r-- | deploy/adapters/ansible/roles/cinder-volume/tasks/main.yml | 18 |
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 |