From 800b1cb00b37c32e95d664df34f3fd76747b41d4 Mon Sep 17 00:00:00 2001 From: Robert Osowiecki Date: Mon, 27 Apr 2020 22:04:41 +0200 Subject: [PATCH] fs_type parameter is not really optional for negative part_start parameter --- plugins/modules/system/parted.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/modules/system/parted.py b/plugins/modules/system/parted.py index 1fbe33175b..f9dc163355 100644 --- a/plugins/modules/system/parted.py +++ b/plugins/modules/system/parted.py @@ -625,6 +625,10 @@ def main(): if current_device['generic'].get('table', None) != label: script += "mklabel %s " % label + # parted <= 3.2.153 bug: optional filesystem parameter is mandatory for negative part_start + if fs_type is None and part_start.startswith('-'): + fs_type = 'ext2' + # Create partition if required if part_type and not part_exists(current_parts, 'num', number): script += "mkpart %s %s%s %s " % (