mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
tower_credential: Missing 'kind' attribute (#61324)
In the 'tower_credential' module, when the credential 'kind' is set to 'vault', the code expects the other parameter 'vault_id' to be set. Unfortunately, in the module 'credential_type_for_v1_kind' method, the 'kind' parameter is popped, i.e. remove from the module dict of parameters leading to the following error: > Parameter 'vault_id' is only valid if parameter 'kind' is specified as 'vault' Fixes: #45644, #61324 Testing Done: Manually create a playbook with a task as follow - name: Create vault with ID 'bar' exists tower_credential: name: Foobar vault organization: Foobar kind: vault vault_id: bar vault_password: foobar
This commit is contained in:
parent
8cb7b388dc
commit
ae1bd9d1e9
@ -255,7 +255,7 @@ OLD_INPUT_NAMES = (
|
||||
|
||||
def credential_type_for_kind(params):
|
||||
credential_type_res = tower_cli.get_resource('credential_type')
|
||||
kind = params.pop('kind')
|
||||
kind = params.get('kind')
|
||||
arguments = {'managed_by_tower': True}
|
||||
if kind == 'ssh':
|
||||
if params.get('vault_password'):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user