summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn R Barker <john@johnrbarker.com>2018-03-06 08:35:54 +0000
committerGitHub <noreply@github.com>2018-03-06 08:35:54 +0000
commite03b17e2e57b0a161393a044ff7cfd7f367d37b0 (patch)
treea7efcfcd2193fb0c7d459acc92ef48d969c5eec6
parentf48d636500867797e10fff240dd9a5e9e1a649c7 (diff)
downloadansible-e03b17e2e57b0a161393a044ff7cfd7f367d37b0.tar.gz
filesystem: fix documentation (#36556) (#36633)
(cherry picked from commit 07927f52aeafa945a6c14857965ea23a842c562a)
-rw-r--r--lib/ansible/modules/system/filesystem.py6
-rw-r--r--test/sanity/validate-modules/ignore.txt1
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/ansible/modules/system/filesystem.py b/lib/ansible/modules/system/filesystem.py
index fd3f6e3c1b..8ac64bbfc9 100644
--- a/lib/ansible/modules/system/filesystem.py
+++ b/lib/ansible/modules/system/filesystem.py
@@ -30,10 +30,12 @@ options:
- since 2.5, I(dev) can be an image file.
- vfat support was added in 2.5
required: yes
+ aliases: [type]
dev:
description:
- Target path to device or image file.
required: yes
+ aliases: [device]
force:
description:
- If C(yes), allows to create new filesystem on devices that already has filesystem.
@@ -276,11 +278,13 @@ def main():
'lvm': 'LVM2_member',
}
+ fstypes = set(FILESYSTEMS.keys()) - set(friendly_names.values()) | set(friendly_names.keys())
+
# There is no "single command" to manipulate filesystems, so we map them all out and their options
module = AnsibleModule(
argument_spec=dict(
fstype=dict(required=True, aliases=['type'],
- choices=list(FILESYSTEMS.keys()) + list(friendly_names.keys())),
+ choices=list(fstypes)),
dev=dict(required=True, aliases=['device']),
opts=dict(),
force=dict(type='bool', default=False),
diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt
index 07c85d0ae0..6f36ca6d7c 100644
--- a/test/sanity/validate-modules/ignore.txt
+++ b/test/sanity/validate-modules/ignore.txt
@@ -428,7 +428,6 @@ lib/ansible/modules/storage/zfs/zfs_facts.py E323
lib/ansible/modules/storage/zfs/zpool_facts.py E323
lib/ansible/modules/system/authorized_key.py E322
lib/ansible/modules/system/capabilities.py E322
-lib/ansible/modules/system/filesystem.py E322
lib/ansible/modules/system/firewalld.py E322
lib/ansible/modules/system/gluster_volume.py E322
lib/ansible/modules/system/make.py E317