feat: add sync with bitwarden before getting a secret
This commit is contained in:
parent
4d36cd468f
commit
0e33c33415
@ -8,9 +8,15 @@ class BitwardenCommandException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
def get_secret_from_bitwarden(logger, id):
|
def get_secret_from_bitwarden(logger, id):
|
||||||
|
sync_bw(logger)
|
||||||
return command_wrapper(logger, command=f"get item {id}")
|
return command_wrapper(logger, command=f"get item {id}")
|
||||||
|
|
||||||
|
|
||||||
|
def sync_bw(logger):
|
||||||
|
status_output = command_wrapper(logger, command=f"sync")
|
||||||
|
logger.info(f"Sync successful {status_output}")
|
||||||
|
|
||||||
|
|
||||||
def unlock_bw(logger):
|
def unlock_bw(logger):
|
||||||
status_output = command_wrapper(logger, "status", False)
|
status_output = command_wrapper(logger, "status", False)
|
||||||
status = status_output['data']['template']['status']
|
status = status_output['data']['template']['status']
|
||||||
|
Loading…
Reference in New Issue
Block a user