summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc <luc@scof-wh6.rns.apps.ocn.infra.ftgroup>2018-03-30 08:42:02 +0200
committerBrian Coca <brian.coca+git@gmail.com>2018-05-17 11:18:18 -0400
commit51af25bf6079e60bfc6655a56d2fd193c0fc3d3e (patch)
treed4fec2b85386cf9268c301474b06eee3898ecae1
parent4f86bec97770ba7d03f92ef45c01227dc22d9934 (diff)
downloadansible-51af25bf6079e60bfc6655a56d2fd193c0fc3d3e.tar.gz
remove bad lines
add new line and update choice documentation adding description for ocfs2 support use correct variable ansible_distribution to test ocfs2 with Debian distribution use ansible_os_family for Debian increase ocfs2 fs size to 20M (minimal size 11 instead of 10M)
-rw-r--r--lib/ansible/modules/system/filesystem.py14
-rw-r--r--test/integration/targets/filesystem/defaults/main.yml5
-rw-r--r--test/integration/targets/filesystem/tasks/main.yml2
-rw-r--r--test/integration/targets/filesystem/tasks/setup.yml4
4 files changed, 6 insertions, 19 deletions
diff --git a/lib/ansible/modules/system/filesystem.py b/lib/ansible/modules/system/filesystem.py
index 54b0181c15..322279e6db 100644
--- a/lib/ansible/modules/system/filesystem.py
+++ b/lib/ansible/modules/system/filesystem.py
@@ -22,13 +22,14 @@ description:
version_added: "1.2"
options:
fstype:
- choices: [ btrfs, ext2, ext3, ext4, ext4dev, lvm, reiserfs, xfs, vfat ]
+ choices: [ btrfs, ext2, ext3, ext4, ext4dev, lvm, reiserfs, xfs, vfat, ocfs2 ]
description:
- Filesystem type to be created.
- reiserfs support was added in 2.2.
- lvm support was added in 2.5.
- since 2.5, I(dev) can be an image file.
- vfat support was added in 2.5
+ - ocfs2 support was added in 2.6
required: yes
aliases: [type]
dev:
@@ -230,12 +231,7 @@ class Btrfs(Filesystem):
class Ocfs2(Filesystem):
MKFS = 'mkfs.ocfs2'
-<<<<<<< HEAD
-<<<<<<< HEAD
-<<<<<<< HEAD
-=======
->>>>>>> 02a7eb4... Update filesystem.py
class VFAT(Filesystem):
if get_platform() == 'FreeBSD':
MKFS = "newfs_msdos"
@@ -257,12 +253,6 @@ 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'
diff --git a/test/integration/targets/filesystem/defaults/main.yml b/test/integration/targets/filesystem/defaults/main.yml
index b792aef464..7208c80cfc 100644
--- a/test/integration/targets/filesystem/defaults/main.yml
+++ b/test/integration/targets/filesystem/defaults/main.yml
@@ -11,9 +11,6 @@ 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
+ ocfs2: {fssize: 20, grow: False} # grow not implemented
# 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 6feaecc895..03003497a9 100644
--- a/test/integration/targets/filesystem/tasks/main.yml
+++ b/test/integration/targets/filesystem/tasks/main.yml
@@ -12,7 +12,7 @@
grow: '{{ item.value.grow }}'
when:
- 'not (item.key == "btrfs" and ansible_system == "FreeBSD")'
- - 'not (item.key == "ocfs2" and ansible_system != "Ubuntu")'
+ - 'not (item.key == "ocfs2" and ansible_os_family != "Debian")'
# 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 0db14a9e1f..86c8555199 100644
--- a/test/integration/targets/filesystem/tasks/setup.yml
+++ b/test/integration/targets/filesystem/tasks/setup.yml
@@ -30,11 +30,11 @@
- python-xml
- btrfsprogs
- - name: install ocfs2 (Ubuntu)
+ - name: install ocfs2 (Debian)
package:
name: ocfs2-tools
state: present
- when: ansible_os_family == 'Ubuntu'
+ when: ansible_os_family == 'Debian'
when: ansible_system == 'Linux'
- block: