mirror of https://github.com/jumpserver/jumpserver
parent
d7f8ba58ad
commit
09432b01a7
|
@ -119,6 +119,10 @@ class ChangeSecretManager(AccountBasePlaybookManager):
|
|||
else:
|
||||
new_secret = self.get_secret(secret_type)
|
||||
|
||||
if new_secret is None:
|
||||
print(f'new_secret is None, account: {account}')
|
||||
continue
|
||||
|
||||
if self.record_id is None:
|
||||
recorder = ChangeSecretRecord(
|
||||
asset=asset, account=account, execution=self.execution,
|
||||
|
|
|
@ -51,6 +51,9 @@ class VerifyAccountManager(AccountBasePlaybookManager):
|
|||
h['name'] += '(' + account.username + ')'
|
||||
self.host_account_mapper[h['name']] = account
|
||||
secret = account.secret
|
||||
if secret is None:
|
||||
print(f'account {account.name} secret is None')
|
||||
continue
|
||||
|
||||
private_key_path = None
|
||||
if account.secret_type == SecretType.SSH_KEY:
|
||||
|
@ -62,7 +65,7 @@ class VerifyAccountManager(AccountBasePlaybookManager):
|
|||
'name': account.name,
|
||||
'username': account.username,
|
||||
'secret_type': account.secret_type,
|
||||
'secret': account.escape_jinja2_syntax(secret),
|
||||
'secret': account.escape_jinja2_syntax(secret),
|
||||
'private_key_path': private_key_path,
|
||||
'become': account.get_ansible_become_auth(),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue