diff --git a/salt/modules/linux_lvm.py b/salt/modules/linux_lvm.py index 6e1ba2b3e57b..0a975324afa0 100644 --- a/salt/modules/linux_lvm.py +++ b/salt/modules/linux_lvm.py @@ -246,7 +246,7 @@ def pvcreate(devices, override=True, **kwargs): for device in devices: if not os.path.exists(device): raise CommandExecutionError('{0} does not exist'.format(device)) - if not pvdisplay(device): + if not pvdisplay(device, quiet=True): cmd.append(device) elif not override: raise CommandExecutionError('Device "{0}" is already an LVM physical volume.'.format(device)) @@ -311,7 +311,7 @@ def pvremove(devices, override=True): # Verify pvcremove was successful for device in devices: - if pvdisplay(device): + if pvdisplay(device, quiet=True): raise CommandExecutionError('Device "{0}" was not affected.'.format(device)) return True