From 793c18506a4ef773eaf3a197e035465b3ba72d19 Mon Sep 17 00:00:00 2001 From: Alexey Kamenskiy Date: Wed, 12 Jun 2019 20:52:43 +0800 Subject: [PATCH] lvg: fix default value type, should be str (#57723) --- .../fragments/57720-fix-lvg-warning-int-to-str-conversion.yml | 2 ++ lib/ansible/modules/system/lvg.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/57720-fix-lvg-warning-int-to-str-conversion.yml diff --git a/changelogs/fragments/57720-fix-lvg-warning-int-to-str-conversion.yml b/changelogs/fragments/57720-fix-lvg-warning-int-to-str-conversion.yml new file mode 100644 index 00000000000..b25ba4f7393 --- /dev/null +++ b/changelogs/fragments/57720-fix-lvg-warning-int-to-str-conversion.yml @@ -0,0 +1,2 @@ +bugfixes: + - lvg - Fixed warning shown when using default value for pesize about conversion from int to str. diff --git a/lib/ansible/modules/system/lvg.py b/lib/ansible/modules/system/lvg.py index 994a402f167..43b6f69166f 100644 --- a/lib/ansible/modules/system/lvg.py +++ b/lib/ansible/modules/system/lvg.py @@ -38,7 +38,7 @@ options: - The size of the physical extent. pesize must be a power of 2, or multiple of 128KiB. - Since Ansible 2.6, pesize can be optionally suffixed by a UNIT (k/K/m/M/g/G), default unit is megabyte. type: str - default: 4 + default: "4" pv_options: description: - Additional options to pass to C(pvcreate) when creating the volume group. @@ -143,7 +143,7 @@ def main(): argument_spec=dict( vg=dict(type='str', required=True), pvs=dict(type='list'), - pesize=dict(type='str', default=4), + pesize=dict(type='str', default='4'), pv_options=dict(type='str', default=''), vg_options=dict(type='str', default=''), state=dict(type='str', default='present', choices=['absent', 'present']),