test
parent
8c2a00e869
commit
2edcc11613
|
|
@ -1,10 +1,13 @@
|
|||
from os import getenv
|
||||
from os import getenv, environ
|
||||
import hvac
|
||||
|
||||
|
||||
def connect_hvac():
|
||||
for key, value in environ.items():
|
||||
print(f"{key}={value}")
|
||||
client = hvac.Client(
|
||||
url='https://vlt.dataekb.ru:8222',
|
||||
token= getenv('VAULT_TOKEN'),
|
||||
token= environ.get('VAULT_TOKEN'),
|
||||
)
|
||||
print(f"Token exists: {bool(getenv('VAULT_TOKEN'))}")
|
||||
print(f"Authenticated: {client.is_authenticated()}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue