Use package module to install lvm2

The lvm2 package has the same name across supported distros so a single
package task can be used.

Change-Id: Ifbf648d3f3604ae3e727a853b512d5b34ba059ac
This commit is contained in:
Jimmy McCrory 2017-11-21 11:09:36 -06:00
parent 41ff58d5bc
commit 2690270a75

View File

@ -17,17 +17,9 @@
hosts: localhost
become: true
tasks:
- name: Install lvm2 apt package
apt:
name: lvm2
when:
- ansible_pkg_mgr == 'apt'
- name: Install lvm2 package
package:
name: lvm2
when:
- ansible_pkg_mgr in ['yum', 'dnf']
- name: Create sparse Cinder file
command: "truncate -s 10G /openstack/cinder.img"