tests: Use ansible_pkg_mgr fact to determine the BTRFS package

The ansible_distribution variable is causing some troubles since it can
contain spaces etc. As such, we can simply use the ansible_pkg_mgr
module to figure out the name of the package we want to install.

Change-Id: Ic92eb1f9030df2883b049b9868e031ff4f0d42f2
This commit is contained in:
Markos Chandras 2018-03-02 15:37:34 +00:00
parent 815ece7454
commit e3d35d306c
1 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@
- block:
- name: Install BTRFS packages
package:
name: "{{ btrfs_package[ansible_distribution | lower] }}"
name: "{{ btrfs_package[ansible_pkg_mgr | lower] }}"
state: present
- name: Create base directories
@ -55,6 +55,6 @@
- lxc_container_backing_store == 'btrfs'
vars:
btrfs_package:
ubuntu: "btrfs-tools"
redhat: "btrfs-progs"
suse: "btrfsprogs"
apt: "btrfs-tools"
yum: "btrfs-progs"
zypper: "btrfsprogs"