From 1d60d33dc1287235f96fab937708292705303e95 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Thu, 8 Jan 2015 21:44:58 -0200 Subject: [PATCH] crypttab: Fix parameter checking with state=absent Only the `name` parameter is required when removing an entry, but the module tried to ensure at least one other parameter was set. --- system/crypttab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/crypttab.py b/system/crypttab.py index 70230fa53e1..ffb60516f3d 100644 --- a/system/crypttab.py +++ b/system/crypttab.py @@ -103,7 +103,7 @@ def main(): state = module.params['state'] path = module.params['path'] - if backing_device is None and password is None and opts is None: + if state != 'absent' and backing_device is None and password is None and opts is None: module.fail_json(msg="expected one or more of 'backing_device', 'password' or 'opts'", **module.params)