diff --git a/roles/ipaserver/library/ipaserver_master_password.py b/roles/ipaserver/library/ipaserver_master_password.py index 3021498ba77ef60dc7ffc69f6830e3dd221da56d..d048a839882d2586d2572e5702ed09e83c368d0a 100644 --- a/roles/ipaserver/library/ipaserver_master_password.py +++ b/roles/ipaserver/library/ipaserver_master_password.py @@ -5,7 +5,7 @@ # # Based on ipa-server-install code # -# Copyright (C) 2017 Red Hat +# Copyright (C) 2017-2022 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify @@ -40,12 +40,14 @@ description: options: dm_password: description: Directory Manager password - required: no + type: str + required: yes master_password: description: kerberos master password (normally autogenerated) - required: yes + type: str + required: no author: - - Thomas Woerner + - Thomas Woerner (@t-woerner) ''' EXAMPLES = ''' @@ -54,6 +56,7 @@ EXAMPLES = ''' RETURN = ''' password: description: The master password + type: str returned: always ''' @@ -61,6 +64,7 @@ import os from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.ansible_ipa_server import ( + check_imports, setup_logging, options, paths, read_cache, ipa_generate_password ) @@ -69,13 +73,14 @@ def main(): module = AnsibleModule( argument_spec=dict( # basic - dm_password=dict(required=True, no_log=True), - master_password=dict(required=False, no_log=True), + dm_password=dict(required=True, type='str', no_log=True), + master_password=dict(required=False, type='str', no_log=True), ), - supports_check_mode=True, + supports_check_mode=False, ) module._ansible_debug = True + check_imports(module) setup_logging() options.dm_password = module.params.get('dm_password')