mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-09 23:54:21 -07:00
filesystem: extend support for FreeBSD (#2902)
* extend support for FreeBSD * Check if FS exists with `fstyp` if `blkid` fails to find FS signature (fix a potential data loss) * Add support for FreeBSD special devices (character devices). * Add support for FreeBSD native fstype (UFS). * Update DOCUMENTATION accordingly. * add/update integration tests * Add tests for `fstype=ufs` on FreeBSD. * Run `remove_fs` tests (`state=absent`) on FreeBSD. * Run `overwrite_another_fs` tests on FreeBSD. * add a changelog fragment * fix indentation * restrict new tests to regular files * fix typo * fix searching of providersize (block count) * add '-y' option to growfs command * remove references to versions older than the collection itself * bump version adding new feats to 3.4.0 * reformat *collection* and *version added* for better DOCUMENTATION parsing * skip tests for FreeBSD < 12.2 * run tests for FreeBSD >= 12.2 * re-enable tests for FreeBSD < 12.2 and give it a try with group1 * util-linux not available on FreeBSD < 12.2
This commit is contained in:
parent
4ae392e5de
commit
9023d4dba1
10 changed files with 162 additions and 46 deletions
|
@ -35,6 +35,10 @@
|
|||
# Available on FreeBSD but not on testbed (util-linux conflicts with e2fsprogs): wipefs, mkfs.minix
|
||||
- 'not (ansible_system == "FreeBSD" and item.1 in ["overwrite_another_fs", "remove_fs"])'
|
||||
|
||||
# Linux limited support
|
||||
# Not available: ufs (this is FreeBSD's native fs)
|
||||
- 'not (ansible_system == "Linux" and item.0.key == "ufs")'
|
||||
|
||||
# Other limitations and corner cases
|
||||
|
||||
# f2fs-tools and reiserfs-utils packages not available with RHEL/CentOS on CI
|
||||
|
@ -59,3 +63,24 @@
|
|||
item.0.key == "xfs" and ansible_python.version.major == 2)'
|
||||
|
||||
loop: "{{ query('dict', tested_filesystems)|product(['create_fs', 'overwrite_another_fs', 'remove_fs'])|list }}"
|
||||
|
||||
|
||||
# With FreeBSD extended support (util-linux is not available before 12.2)
|
||||
|
||||
- include_tasks: freebsd_setup.yml
|
||||
when:
|
||||
- 'ansible_system == "FreeBSD"'
|
||||
- 'ansible_distribution_version is version("12.2", ">=")'
|
||||
|
||||
- include_tasks: create_device.yml
|
||||
vars:
|
||||
image_file: '{{ remote_tmp_dir }}/img'
|
||||
fstype: '{{ item.0.key }}'
|
||||
fssize: '{{ item.0.value.fssize }}'
|
||||
grow: '{{ item.0.value.grow }}'
|
||||
action: '{{ item.1 }}'
|
||||
when:
|
||||
- 'ansible_system == "FreeBSD"'
|
||||
- 'ansible_distribution_version is version("12.2", ">=")'
|
||||
- 'item.0.key in ["xfs", "vfat"]'
|
||||
loop: "{{ query('dict', tested_filesystems)|product(['create_fs', 'overwrite_another_fs', 'remove_fs'])|list }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue