filesystem: add f2fs integration tests

This commit is contained in:
Pierre-Louis Bonicoli
2018-05-21 17:13:26 +02:00
committed by Michael Scherer
parent f6f413ec7a
commit ff68b197e2
4 changed files with 32 additions and 1 deletions

View File

@@ -22,8 +22,14 @@
when:
- 'not (item.key == "btrfs" and ansible_system == "FreeBSD")'
- 'not (item.key == "ocfs2" and ansible_os_family != "Debian")'
# On Ubuntu trusty, blkid is unable to identify filesystem smaller than 256Mo, see:
# On Ubuntu trusty, blkid (2.20.1) is unable to identify filesystem smaller than 256Mo, see:
# 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
- 'not (item.key == "btrfs" and (ansible_distribution == "Ubuntu" and ansible_distribution_release == "trusty"))'
- 'not (item.key == "f2fs" and ansible_system == "FreeBSD")'
# f2fs-tools package not available with RHEL/CentOS
- 'not (item.key == "f2fs" and ansible_distribution in ["CentOS", "RedHat"])'
# 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
- 'not (item.key == "f2fs" and ansible_distribution == "Ubuntu" and ansible_distribution_version is version("14.04", "<="))'
loop: "{{ lookup('dict', tested_filesystems) }}"

View File

@@ -35,6 +35,24 @@
name: ocfs2-tools
state: present
when: ansible_os_family == 'Debian'
- when:
- ansible_os_family != 'RedHat' or ansible_distribution == 'Fedora'
- ansible_distribution != 'Ubuntu' or ansible_distribution_version is version('16.04', '>=')
block:
- name: install f2fs
package:
name: f2fs-tools
state: present
- name: fetch f2fs version
command: mkfs.f2fs /dev/null
ignore_errors: yes
register: mkfs_f2fs
- set_fact:
f2fs_version: '{{ mkfs_f2fs.stdout | regex_search("F2FS-tools: mkfs.f2fs Ver:.*") | regex_replace("F2FS-tools: mkfs.f2fs Ver: ([0-9.]+) .*", "\1") }}'
when: ansible_system == 'Linux'
- block: