2018-01-11 17:10:14 +01:00
|
|
|
|
- debug:
|
|
|
|
|
msg: '{{ role_name }}'
|
|
|
|
|
- debug:
|
|
|
|
|
msg: '{{ role_path|basename }}'
|
|
|
|
|
- import_tasks: setup.yml
|
|
|
|
|
|
2018-04-26 03:03:46 +02:00
|
|
|
|
- include_vars: "{{ lookup('first_found', search) }}"
|
|
|
|
|
vars:
|
|
|
|
|
search:
|
|
|
|
|
files:
|
|
|
|
|
- '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml'
|
|
|
|
|
- 'default.yml'
|
|
|
|
|
paths:
|
|
|
|
|
- '../vars/'
|
|
|
|
|
|
2018-06-21 10:24:28 +02:00
|
|
|
|
- include_tasks: create_device.yml
|
2018-01-11 17:10:14 +01:00
|
|
|
|
vars:
|
2019-08-14 09:12:05 +02:00
|
|
|
|
image_file: '{{ remote_tmp_dir }}/img'
|
2018-06-21 10:24:28 +02:00
|
|
|
|
fstype: '{{ item.0.key }}'
|
|
|
|
|
fssize: '{{ item.0.value.fssize }}'
|
|
|
|
|
grow: '{{ item.0.value.grow }}'
|
|
|
|
|
action: '{{ item.1 }}'
|
2018-01-11 17:10:14 +01:00
|
|
|
|
when:
|
2018-06-21 10:24:28 +02:00
|
|
|
|
- 'not (item.0.key == "btrfs" and ansible_system == "FreeBSD")' # btrfs not available on FreeBSD
|
|
|
|
|
# On Ubuntu trusty, blkid is unable to identify filesystem smaller than 256Mo, see
|
2018-01-11 17:10:14 +01:00
|
|
|
|
# https://www.kernel.org/pub/linux/utils/util-linux/v2.21/v2.21-ChangeLog
|
|
|
|
|
# https://anonscm.debian.org/cgit/collab-maint/pkg-util-linux.git/commit/?id=04f7020eadf31efc731558df92daa0a1c336c46c
|
2018-06-21 10:24:28 +02:00
|
|
|
|
- 'not (item.0.key == "btrfs" and (ansible_distribution == "Ubuntu" and ansible_distribution_release == "trusty"))'
|
2019-11-15 23:03:27 +01:00
|
|
|
|
- 'not (item.0.key == "btrfs" and (ansible_facts.os_family == "RedHat" and ansible_facts.distribution_major_version is version("8", ">=")))'
|
2018-06-21 10:24:28 +02:00
|
|
|
|
- 'not (item.0.key == "lvm" and ansible_system == "FreeBSD")' # LVM not available on FreeBSD
|
|
|
|
|
- 'not (item.0.key == "lvm" and ansible_virtualization_type == "docker")' # Tests use losetup which can not be used inside unprivileged container
|
|
|
|
|
- 'not (item.0.key == "ocfs2" and ansible_os_family != "Debian")' # ocfs2 only available on Debian based distributions
|
|
|
|
|
- 'not (item.0.key == "f2fs" and ansible_system == "FreeBSD")'
|
2018-05-21 17:13:26 +02:00
|
|
|
|
# f2fs-tools package not available with RHEL/CentOS
|
2018-06-21 10:24:28 +02:00
|
|
|
|
- 'not (item.0.key == "f2fs" and ansible_distribution in ["CentOS", "RedHat"])'
|
2018-05-21 17:13:26 +02:00
|
|
|
|
# On Ubuntu trusty, blkid (2.20.1) is unable to identify F2FS filesystem. blkid handles F2FS since v2.23, see:
|
|
|
|
|
# https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.23/v2.23-ReleaseNotes
|
2018-06-21 10:24:28 +02:00
|
|
|
|
- 'not (item.0.key == "f2fs" and ansible_distribution == "Ubuntu" and ansible_distribution_version is version("14.04", "<="))'
|
|
|
|
|
- 'not (item.1 == "overwrite_another_fs" and ansible_system == "FreeBSD")'
|
2019-02-21 23:15:12 +01:00
|
|
|
|
|
|
|
|
|
# The xfsprogs package on newer versions of OpenSUSE (15+) require Python 3, we skip this on our Python 2 container
|
|
|
|
|
# OpenSUSE 42.3 Python2 and the other py3 containers are not affected so we will continue to run that
|
|
|
|
|
- 'not (item.0.key == "xfs" and ansible_os_family == "Suse" and ansible_python.version.major == 2 and ansible_distribution_major_version|int != 42)'
|
2018-06-21 10:24:28 +02:00
|
|
|
|
loop: "{{ query('dict', tested_filesystems)|product(['create_fs', 'overwrite_another_fs'])|list }}"
|