Temporary fix on getvaultpass script.
This commit is contained in:
parent
dca18c85bd
commit
ca3fb6d218
@ -7,11 +7,19 @@ from base64 import b64decode
|
||||
from requests import get
|
||||
from socket import gethostname
|
||||
from tempfile import mkstemp
|
||||
import time
|
||||
import os
|
||||
|
||||
key = MD5.new(gethostname()).digest()
|
||||
cipher = AES.new(key, AES.MODE_ECB)
|
||||
|
||||
for i in range(10):
|
||||
try:
|
||||
base64enc = get("http://{{ ansible_local.domain.serverfqdn }}:3000/vaultpass")
|
||||
break
|
||||
except:
|
||||
time.sleep(1)
|
||||
|
||||
encrypted = b64decode(base64enc.content)
|
||||
longpass = cipher.decrypt(encrypted)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user