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.
pull/18777/head
Yuri Kunde Schlesner 10 years ago committed by Matt Clay
parent 4f0e1c850c
commit c3940f16eb

@ -103,7 +103,7 @@ def main():
state = module.params['state'] state = module.params['state']
path = module.params['path'] 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.fail_json(msg="expected one or more of 'backing_device', 'password' or 'opts'",
**module.params) **module.params)

Loading…
Cancel
Save