summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlchantre <35963573+lchantre@users.noreply.github.com>2018-01-31 15:32:18 +0100
committerBrian Coca <brian.coca+git@gmail.com>2018-05-17 11:18:18 -0400
commit4f86bec97770ba7d03f92ef45c01227dc22d9934 (patch)
treeefbdc314645aa0fda34ca97714e138dae0befc05
parent63e16431b7e08d85bd9846a504f63e0d2442a1a8 (diff)
downloadansible-4f86bec97770ba7d03f92ef45c01227dc22d9934.tar.gz
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
-rw-r--r--lib/ansible/modules/system/filesystem.py16
-rw-r--r--test/integration/targets/filesystem/defaults/main.yml4
-rw-r--r--test/integration/targets/filesystem/tasks/main.yml1
-rw-r--r--test/integration/targets/filesystem/tasks/setup.yml6
4 files changed, 27 insertions, 0 deletions
diff --git a/lib/ansible/modules/system/filesystem.py b/lib/ansible/modules/system/filesystem.py
index 8ac64bbfc9..54b0181c15 100644
--- a/lib/ansible/modules/system/filesystem.py
+++ b/lib/ansible/modules/system/filesystem.py
@@ -227,6 +227,15 @@ class Btrfs(Filesystem):
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):
if get_platform() == 'FreeBSD':
MKFS = "newfs_msdos"
@@ -248,6 +257,12 @@ class VFAT(Filesystem):
return [cmd, "-s", str(dev.size()), str(dev.path)]
+=======
+
+>>>>>>> 5128847... Update filesystem.py
+=======
+
+>>>>>>> e8781e5... delete trailing spaces
class LVM(Filesystem):
MKFS = 'pvcreate'
MKFS_FORCE_FLAGS = '-f'
@@ -269,6 +284,7 @@ FILESYSTEMS = {
'xfs': XFS,
'btrfs': Btrfs,
'vfat': VFAT,
+ 'ocfs2': Ocfs2,
'LVM2_member': LVM,
}
diff --git a/test/integration/targets/filesystem/defaults/main.yml b/test/integration/targets/filesystem/defaults/main.yml
index dc5c203c4a..b792aef464 100644
--- a/test/integration/targets/filesystem/defaults/main.yml
+++ b/test/integration/targets/filesystem/defaults/main.yml
@@ -11,5 +11,9 @@ tested_filesystems:
ext2: {fssize: 10, grow: True}
xfs: {fssize: 20, grow: False} # grow requires a mounted filesystem
btrfs: {fssize: 100, grow: False} # grow not implemented
+<<<<<<< HEAD
vfat: {fssize: 20, grow: True}
+=======
+ ocfs2: {fssize: 10, grow: False} # grow not implemented
+>>>>>>> 6bf2591... add ocsfs2 defaut var
# untested: lvm, requires a block device
diff --git a/test/integration/targets/filesystem/tasks/main.yml b/test/integration/targets/filesystem/tasks/main.yml
index 9ebba0acb3..6feaecc895 100644
--- a/test/integration/targets/filesystem/tasks/main.yml
+++ b/test/integration/targets/filesystem/tasks/main.yml
@@ -12,6 +12,7 @@
grow: '{{ item.value.grow }}'
when:
- '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:
# 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
diff --git a/test/integration/targets/filesystem/tasks/setup.yml b/test/integration/targets/filesystem/tasks/setup.yml
index 8dca9f2401..0db14a9e1f 100644
--- a/test/integration/targets/filesystem/tasks/setup.yml
+++ b/test/integration/targets/filesystem/tasks/setup.yml
@@ -29,6 +29,12 @@
with_items:
- python-xml
- btrfsprogs
+
+ - name: install ocfs2 (Ubuntu)
+ package:
+ name: ocfs2-tools
+ state: present
+ when: ansible_os_family == 'Ubuntu'
when: ansible_system == 'Linux'
- block: