diff --git a/roles/ipaclient/library/ipaclient_setup_nis.py b/roles/ipaclient/library/ipaclient_setup_nis.py index f07d391c21867cec8d00f1703f936c18730d5688..6c4141a86fe03184960d80cc9cd698584cc25015 100644 --- a/roles/ipaclient/library/ipaclient_setup_nis.py +++ b/roles/ipaclient/library/ipaclient_setup_nis.py @@ -5,7 +5,7 @@ # # Based on ipa-client-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: domain: description: Primary DNS domain of the IPA deployment - required: no + type: str + required: yes nisdomain: description: The NIS domain name - required: yes + type: str + required: no author: - - Thomas Woerner + - Thomas Woerner (@t-woerner) ''' EXAMPLES = ''' @@ -59,21 +61,22 @@ RETURN = ''' from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.ansible_ipa_client import ( - setup_logging, options, sysrestore, paths, configure_nisdomain, - getargspec + setup_logging, check_imports, options, sysrestore, paths, + configure_nisdomain, getargspec ) def main(): module = AnsibleModule( argument_spec=dict( - domain=dict(required=True), - nisdomain=dict(required=False), + domain=dict(required=True, type='str'), + nisdomain=dict(required=False, type='str'), ), - supports_check_mode=True, + supports_check_mode=False, ) module._ansible_debug = True + check_imports(module) setup_logging() domain = module.params.get('domain')