mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-08 06:13:03 +00:00
Code refactoring (#889)
* Add __all__ to all module and plugin utils. * Convert quite a few positional args to keyword args. * Avoid Python 3.8+ syntax.
This commit is contained in:
@@ -117,10 +117,10 @@ def main() -> t.NoReturn:
|
||||
mutually_exclusive=[("certificate_path", "certificate_content")],
|
||||
)
|
||||
module = argument_spec.create_ansible_module(supports_check_mode=True)
|
||||
backend = create_backend(module, True)
|
||||
backend = create_backend(module, needs_acme_v2=True)
|
||||
|
||||
try:
|
||||
client = ACMEClient(module, backend)
|
||||
client = ACMEClient(module=module, backend=backend)
|
||||
if not client.directory.has_renewal_info_endpoint():
|
||||
module.fail_json(
|
||||
msg="The ACME endpoint does not support ACME Renewal Information retrieval"
|
||||
@@ -132,7 +132,7 @@ def main() -> t.NoReturn:
|
||||
)
|
||||
module.exit_json(renewal_info=renewal_info)
|
||||
except ModuleFailException as e:
|
||||
e.do_fail(module)
|
||||
e.do_fail(module=module)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user