mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Fix identification of existing vault type.
In some scenarios, the value of the vault type is returned as a tuple, rather than a string, this made some changes to existing vault to fail. With this change, the vault type is correctly retrieved, if it was not provided by the user.
This commit is contained in:
@@ -494,8 +494,10 @@ def check_encryption_params(module, state, action, vault_type, salt,
|
||||
new_password, new_password_file, res_find):
|
||||
vault_type_invalid = []
|
||||
|
||||
if res_find is not None:
|
||||
if vault_type is None and res_find is not None:
|
||||
vault_type = res_find['ipavaulttype']
|
||||
if isinstance(vault_type, (tuple, list)):
|
||||
vault_type = vault_type[0]
|
||||
|
||||
if vault_type == "standard":
|
||||
vault_type_invalid = ['public_key', 'public_key_file', 'password',
|
||||
|
||||
Reference in New Issue
Block a user