Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache not used #61

Open
vincer opened this issue Oct 25, 2017 · 0 comments
Open

Cache not used #61

vincer opened this issue Oct 25, 2017 · 0 comments

Comments

@vincer
Copy link

vincer commented Oct 25, 2017

ansible-vault version: 2.7.0
ansible version: 2.2.1 and 2.4.0

The cache doesn't seem to ever be used for us. I tried setting --forks=1 and even then I get no cache hits.

Injecting some prints into the code I noticed that _vault_cache is getting populated when there's a cache miss, but the next time the plugin is used _vault_cache is reset to {}. It seems like Ansible is re-importing the plugin every time it's called?

I don't know enough about Ansible plugin development to say whether this is an Ansible core issue or a plugin issue.

Here's a simple example:
https://github.com/vincer/vault-plugin-cache-broken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants