You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
977 B
39 lines
977 B
#!/usr/bin/python
|
|
|
|
DOCUMENTATION = r'''
|
|
---
|
|
module: decort_jwt
|
|
|
|
description: See L(Module Documentation,https://repository.basistech.ru/BASIS/decort-ansible/wiki/Home).
|
|
'''
|
|
|
|
from ansible.module_utils.basic import AnsibleModule
|
|
from ansible.module_utils.decort_utils import DecortController
|
|
|
|
|
|
class DecortJWT(DecortController):
|
|
def __init__(self):
|
|
super().__init__(AnsibleModule(**self.amodule_init_args))
|
|
|
|
@property
|
|
def amodule_init_args(self) -> dict:
|
|
amodule_init_args = self.common_amodule_init_args
|
|
amodule_argument_spec = amodule_init_args['argument_spec']
|
|
del amodule_argument_spec['controller_url']
|
|
del amodule_argument_spec['jwt']
|
|
amodule_argument_spec['authenticator']['choices'].remove('jwt')
|
|
|
|
return amodule_init_args
|
|
|
|
def run(self):
|
|
self.result['jwt'] = self.jwt
|
|
self.amodule.exit_json(**self.result)
|
|
|
|
|
|
def main():
|
|
DecortJWT().run()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|