mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-22 05:09:12 +00:00
Reformat everything.
This commit is contained in:
parent
3f2213791a
commit
340ff8586d
1008 changed files with 61301 additions and 58309 deletions
|
|
@ -131,9 +131,14 @@ end_state:
|
|||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak import (
|
||||
KeycloakAPI, KeycloakError, get_token)
|
||||
KeycloakAPI,
|
||||
KeycloakError,
|
||||
get_token,
|
||||
)
|
||||
from ansible_collections.community.general.plugins.module_utils.identity.keycloak.keycloak_clientsecret import (
|
||||
keycloak_clientsecret_module, keycloak_clientsecret_module_resolve_params)
|
||||
keycloak_clientsecret_module,
|
||||
keycloak_clientsecret_module_resolve_params,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -157,20 +162,17 @@ def main():
|
|||
|
||||
if module.check_mode:
|
||||
dummy_result = {
|
||||
"msg": 'No action taken while in check mode',
|
||||
"end_state": {'type': 'secret', 'value': 'X' * 32}
|
||||
"msg": "No action taken while in check mode",
|
||||
"end_state": {"type": "secret", "value": "X" * 32},
|
||||
}
|
||||
module.exit_json(**dummy_result)
|
||||
|
||||
# Create new secret
|
||||
clientsecret = kc.create_clientsecret(id=id, realm=realm)
|
||||
|
||||
result = {
|
||||
"msg": f'New client secret has been generated for ID {id}',
|
||||
"end_state": clientsecret
|
||||
}
|
||||
result = {"msg": f"New client secret has been generated for ID {id}", "end_state": clientsecret}
|
||||
module.exit_json(**result)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue