From 80e2de0e5ddec8b79cec7c0dbf9d966c1c782008 Mon Sep 17 00:00:00 2001 From: Alexander Gubin Date: Mon, 12 Jan 2015 17:43:51 +0100 Subject: [PATCH] lvol: Cast size(LogicalVolumeSize) to lower to fix the difference between lvs and lvcreate --- lib/ansible/modules/extras/system/lvol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/system/lvol.py b/lib/ansible/modules/extras/system/lvol.py index e9d477edf8..8276d753db 100644 --- a/lib/ansible/modules/extras/system/lvol.py +++ b/lib/ansible/modules/extras/system/lvol.py @@ -132,8 +132,8 @@ def main(): # LVCREATE(8) -L --size option unit elif size[-1].isalpha(): - if size[-1] in 'bBsSkKmMgGtTpPeE': - size_unit = size[-1] + if size[-1].lower() in 'bskmgtpe': + size_unit = size[-1].lower() if size[0:-1].isdigit(): size = int(size[0:-1]) else: