Fixed 'HashiVault' object has no attribute 'verify'"} (#36513)

This commit is contained in:
SerJ 2018-05-24 00:59:49 +03:00 committed by Adam Miller
parent 571d971039
commit 0ceb717cae

View file

@ -122,6 +122,8 @@ class HashiVault:
else:
self.secret_field = ''
self.verify = self.boolean_or_cacert(kwargs.get('validate_certs', True), kwargs.get('cacert', ''))
# If a particular backend is asked for (and its method exists) we call it, otherwise drop through to using
# token auth. This means if a particular auth backend is requested and a token is also given, then we
# ignore the token and attempt authentication against the specified backend.
@ -150,8 +152,6 @@ class HashiVault:
if self.token is None:
raise AnsibleError("No Vault Token specified")
self.verify = self.boolean_or_cacert(kwargs.get('validate_certs', True), kwargs.get('cacert', ''))
self.client = hvac.Client(url=self.url, token=self.token, verify=self.verify)
if not self.client.is_authenticated():