mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Update filesystem.py
add ocfs2 support for module filesystem Update setup.yml delete trailing spaces add ocsfs2 defaut var Install ocfs2-tools for all linux Testing ocfs2 on for Ubuntu - restrict blkid to be be done
This commit is contained in:
parent
63e16431b7
commit
4f86bec977
4 changed files with 27 additions and 0 deletions
|
@ -227,6 +227,15 @@ class Btrfs(Filesystem):
|
||||||
self.module.warn('Unable to identify mkfs.btrfs version (%r, %r)' % (stdout, stderr))
|
self.module.warn('Unable to identify mkfs.btrfs version (%r, %r)' % (stdout, stderr))
|
||||||
|
|
||||||
|
|
||||||
|
class Ocfs2(Filesystem):
|
||||||
|
MKFS = 'mkfs.ocfs2'
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> 02a7eb4... Update filesystem.py
|
||||||
class VFAT(Filesystem):
|
class VFAT(Filesystem):
|
||||||
if get_platform() == 'FreeBSD':
|
if get_platform() == 'FreeBSD':
|
||||||
MKFS = "newfs_msdos"
|
MKFS = "newfs_msdos"
|
||||||
|
@ -248,6 +257,12 @@ class VFAT(Filesystem):
|
||||||
return [cmd, "-s", str(dev.size()), str(dev.path)]
|
return [cmd, "-s", str(dev.size()), str(dev.path)]
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> 5128847... Update filesystem.py
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> e8781e5... delete trailing spaces
|
||||||
class LVM(Filesystem):
|
class LVM(Filesystem):
|
||||||
MKFS = 'pvcreate'
|
MKFS = 'pvcreate'
|
||||||
MKFS_FORCE_FLAGS = '-f'
|
MKFS_FORCE_FLAGS = '-f'
|
||||||
|
@ -269,6 +284,7 @@ FILESYSTEMS = {
|
||||||
'xfs': XFS,
|
'xfs': XFS,
|
||||||
'btrfs': Btrfs,
|
'btrfs': Btrfs,
|
||||||
'vfat': VFAT,
|
'vfat': VFAT,
|
||||||
|
'ocfs2': Ocfs2,
|
||||||
'LVM2_member': LVM,
|
'LVM2_member': LVM,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,9 @@ tested_filesystems:
|
||||||
ext2: {fssize: 10, grow: True}
|
ext2: {fssize: 10, grow: True}
|
||||||
xfs: {fssize: 20, grow: False} # grow requires a mounted filesystem
|
xfs: {fssize: 20, grow: False} # grow requires a mounted filesystem
|
||||||
btrfs: {fssize: 100, grow: False} # grow not implemented
|
btrfs: {fssize: 100, grow: False} # grow not implemented
|
||||||
|
<<<<<<< HEAD
|
||||||
vfat: {fssize: 20, grow: True}
|
vfat: {fssize: 20, grow: True}
|
||||||
|
=======
|
||||||
|
ocfs2: {fssize: 10, grow: False} # grow not implemented
|
||||||
|
>>>>>>> 6bf2591... add ocsfs2 defaut var
|
||||||
# untested: lvm, requires a block device
|
# untested: lvm, requires a block device
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
grow: '{{ item.value.grow }}'
|
grow: '{{ item.value.grow }}'
|
||||||
when:
|
when:
|
||||||
- 'not (item.key == "btrfs" and ansible_system == "FreeBSD")'
|
- 'not (item.key == "btrfs" and ansible_system == "FreeBSD")'
|
||||||
|
- 'not (item.key == "ocfs2" and ansible_system != "Ubuntu")'
|
||||||
# On Ubuntu trusty, blkid is unable to identify filesystem smaller than 256Mo, see:
|
# On Ubuntu trusty, blkid is unable to identify filesystem smaller than 256Mo, see:
|
||||||
# https://www.kernel.org/pub/linux/utils/util-linux/v2.21/v2.21-ChangeLog
|
# 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
|
# https://anonscm.debian.org/cgit/collab-maint/pkg-util-linux.git/commit/?id=04f7020eadf31efc731558df92daa0a1c336c46c
|
||||||
|
|
|
@ -29,6 +29,12 @@
|
||||||
with_items:
|
with_items:
|
||||||
- python-xml
|
- python-xml
|
||||||
- btrfsprogs
|
- btrfsprogs
|
||||||
|
|
||||||
|
- name: install ocfs2 (Ubuntu)
|
||||||
|
package:
|
||||||
|
name: ocfs2-tools
|
||||||
|
state: present
|
||||||
|
when: ansible_os_family == 'Ubuntu'
|
||||||
when: ansible_system == 'Linux'
|
when: ansible_system == 'Linux'
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue