diff --git a/system/service.py b/system/service.py index e8f50172a6e..ef1aded72c6 100644 --- a/system/service.py +++ b/system/service.py @@ -1463,9 +1463,8 @@ def main(): arguments = dict(aliases=['args'], default=''), ), 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)