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.
This commit is contained in:
Yuri Kunde Schlesner 2015-01-08 21:44:58 -02:00 committed by Matt Clay
parent 4f0e1c850c
commit c3940f16eb

View file

@ -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)