diff --git a/library/ipajoin.py b/library/ipajoin.py index 1ae9ff1a1df1c8cb34d2723060be5acf613cbf83..746d842fbeef28f61f01a3fa9711eb093bbbece6 100644 --- a/library/ipajoin.py +++ b/library/ipajoin.py @@ -202,8 +202,6 @@ def main(): kinit_attempts=dict(required=False, type='int', default=5), debug=dict(required=False, type='bool'), ), - mutually_exclusive = [['password','keytab']], - required_one_of = [['password', 'keytab']], supports_check_mode = True, ) @@ -222,6 +220,10 @@ def main(): kinit_attempts = module.params.get('kinit_attempts') debug = module.params.get('debug') + if password is not None and password != "" and \ + keytab is not None and keytab != "": + module.fail_json(msg="Password and keytab cannot be used together") + client_domain = hostname[hostname.find(".")+1:] nolog = tuple() env = {'PATH': SECURE_PATH}