mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 11:27:36 -02:30
Use a callable function instead of a lambda.
This commit is contained in:
@@ -42,12 +42,17 @@ tss_inputs = {
|
|||||||
'required': ['server_url', 'username', 'password', 'secret_id', 'secret_field'],
|
'required': ['server_url', 'username', 'password', 'secret_id', 'secret_field'],
|
||||||
}
|
}
|
||||||
|
|
||||||
tss_plugin = CredentialPlugin(
|
|
||||||
'Thycotic Secret Server',
|
def tss_backend(**kwargs):
|
||||||
tss_inputs,
|
return ServerSecret(
|
||||||
lambda **kwargs: ServerSecret(
|
|
||||||
**SecretServer(kwargs['server_url'], PasswordGrantAuthorizer(kwargs['server_url'], kwargs['username'], kwargs['password'])).get_secret(
|
**SecretServer(kwargs['server_url'], PasswordGrantAuthorizer(kwargs['server_url'], kwargs['username'], kwargs['password'])).get_secret(
|
||||||
kwargs['secret_id']
|
kwargs['secret_id']
|
||||||
)
|
)
|
||||||
).fields[kwargs['secret_field']],
|
).fields[kwargs['secret_field']]
|
||||||
|
|
||||||
|
|
||||||
|
tss_plugin = CredentialPlugin(
|
||||||
|
'Thycotic Secret Server',
|
||||||
|
tss_inputs,
|
||||||
|
tss_backend,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user