switched to use built in function for validation

This commit is contained in:
Brian Coca 2016-09-07 12:10:35 -04:00 committed by Matt Clay
parent e27b7af1e6
commit 6030bcdb47

View file

@ -1463,9 +1463,8 @@ def main():
arguments = dict(aliases=['args'], default=''), arguments = dict(aliases=['args'], default=''),
), ),
supports_check_mode=True supports_check_mode=True
required_one_of=[['state', 'enabled']],
) )
if module.params['state'] is None and module.params['enabled'] is None:
module.fail_json(msg="Neither 'state' nor 'enabled' set")
service = Service(module) service = Service(module)