mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-15 09:30:50 -07:00
Add RHEL 9.0, FreeBSD 13.1, Ubuntu 22.04 and Fedora 36 to CI, fix bug in filesystem module (#4700)
* Add RHEL 9.0 and FreeBSD 13.1 to CI. * RHEL 9 has no pyOpenSSL apparently. * Adjust URL for EPEL. * Fix cargo install on FreeBSD 13.1. * Add Ubuntu 22.04 and Fedora 36 to CI. * Fix logic. * filesystem: do not die output line does not contain ':' * Skip django_manage tests on RHEL 9 as well. * homectl tests don't work with RHEL 9.0. * Improve error handling, improve fatresize output handling. * Skip Fedora 36. * Skip filesystem vfat tests on Ubuntu 22.04. There, resizing fails with a bug: Bug: Assertion (disk != NULL) at ../../libparted/disk.c:1620 in function ped_disk_get_partition_by_sector() failed. * 'trusty' is 14.04. Adding 22.04 to skip list. * Skip jail tests for FreeBSD 13.1. * Add config for postgres on Ubuntu 22.04. * Make CentOS 6 happy. * Adjust postgres version. * Try installing EPEL a bit differently. * Skip ufw and iso_extract tests on RHEL 9. * Skip odbc tests on RHEL 9. * Skip RHEL 9.0 for snap tests. * Add changelog fragment for filesystem code changes.
This commit is contained in:
parent
8421af1ea3
commit
319c29c2a2
24 changed files with 96 additions and 28 deletions
|
@ -268,7 +268,7 @@ class Ext(Filesystem):
|
|||
if None not in (block_size, block_count):
|
||||
break
|
||||
else:
|
||||
raise ValueError(out)
|
||||
raise ValueError(repr(out))
|
||||
|
||||
return block_size * block_count
|
||||
|
||||
|
@ -319,7 +319,7 @@ class XFS(Filesystem):
|
|||
if None not in (block_size, block_count):
|
||||
break
|
||||
else:
|
||||
raise ValueError(out)
|
||||
raise ValueError(repr(out))
|
||||
|
||||
return block_size * block_count
|
||||
|
||||
|
@ -364,7 +364,7 @@ class Btrfs(Filesystem):
|
|||
for line in stdout.splitlines():
|
||||
if "Device size" in line:
|
||||
return int(line.split()[-1])
|
||||
raise ValueError(stdout)
|
||||
raise ValueError(repr(stdout))
|
||||
|
||||
|
||||
class Ocfs2(Filesystem):
|
||||
|
@ -405,7 +405,7 @@ class F2fs(Filesystem):
|
|||
if None not in (sector_size, sector_count):
|
||||
break
|
||||
else:
|
||||
raise ValueError(out)
|
||||
raise ValueError(repr(out))
|
||||
|
||||
return sector_size * sector_count
|
||||
|
||||
|
@ -428,12 +428,15 @@ class VFAT(Filesystem):
|
|||
dummy, out, dummy = self.module.run_command([cmd, '--info', str(dev)], check_rc=True, environ_update=self.LANG_ENV)
|
||||
fssize = None
|
||||
for line in out.splitlines()[1:]:
|
||||
param, value = line.split(':', 1)
|
||||
if param.strip() == 'Size':
|
||||
parts = line.split(':', 1)
|
||||
if len(parts) < 2:
|
||||
continue
|
||||
param, value = parts
|
||||
if param.strip() in ('Size', 'Cur size'):
|
||||
fssize = int(value.strip())
|
||||
break
|
||||
else:
|
||||
raise ValueError(out)
|
||||
raise ValueError(repr(out))
|
||||
|
||||
return fssize
|
||||
|
||||
|
@ -477,7 +480,7 @@ class UFS(Filesystem):
|
|||
if None not in (fragmentsize, providersize):
|
||||
break
|
||||
else:
|
||||
raise ValueError(out)
|
||||
raise ValueError(repr(out))
|
||||
|
||||
return fragmentsize * providersize
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue