Closed stevebeck89 closed 3 years ago
@tomoh1r Could you take a look at this? It's blocking using this library with ansible 2.10+
@tomoh1r Could you take a look at this? It's blocking using this library with ansible 2.10+
I'm blocked by this too. @stevebeck89 fix looks good to me. I too would love to see pull request accepted so ansible_vault package can be used with ansible 2.10+
This backwards compatibility logic is blocking me too.
any chance of someone forking this project to maintain it?
The entire project is 50 lines. We reimplemented the few parts we use directly.
:+1:
The few parts are indeed actually 4 lines:
from ansible.parsing.vault import VaultLib, VaultSecret
from ansible.constants import DEFAULT_VAULT_ID_MATCH
vault = VaultLib([(DEFAULT_VAULT_ID_MATCH, VaultSecret(passwd.encode()))])
secrets = yaml.safe_load(vault.decrypt(open("./vault.yml").read()))
Thanks!
Sorry too late responses, I merged, and released https://pypi.org/project/ansible-vault/2.0.0/.
Recommended fix for Issue https://github.com/tomoh1r/ansible-vault/issues/32
Update version comparison to use
pkg_resources
, using this instead ofpackaging.version.parse
for backwards compatibility.Tested the
pkg_resources.parse_version
and comparison logic in python 2.7.16 and 3.6.5.Pulled information from https://stackoverflow.com/questions/11887762/how-do-i-compare-version-numbers-in-python