Comments (6)
Thanks for comment @codestation @Dutchy- , just realized this feature and would be nice to be included in the extension :)
I will try to understand a bit and make it happen 👍
from vscode-ansible-vault.
In my understanding ansible reads the config file in following order, from ansible doc:
* ANSIBLE_CONFIG (an environment variable)
* ansible.cfg (in the current directory)
* .ansible.cfg (in the home directory)
* /etc/ansible/ansible.cfg
And right now the extension should check the ansible.cfg
in the project directory (in step 2). I would opt to follow the convention from ansible.
from vscode-ansible-vault.
Yes, you are right, it should only read from those 3 locations. A proper fix is to remove the usage of vscode.workspace.rootPath (already deprecated) and migrate to multi-root workspace API.
For now i am using a workaround of editing my workspace file and putting the project that i am currently working on as the first entry.
Note: Vaulty can find the correct ansible.cfg, but i stick to your extension since Vaulty doens't encrypt back and shows a read-only yml.
from vscode-ansible-vault.
I also encountered this. I personally would love to have Vaulty's approach of finding the working directory by checking all parent paths.
https://github.com/codeflows/vaulty/blob/master/src/vault.ts#L8
I leave it up to you if you can integrate this with the default ansible configuration order.
from vscode-ansible-vault.
@codestation @Dutchy- Although I have added the support of multi-root workspace, is there any use cases of reading ansible.cfg
from all parent paths?
Because of opening the workspace in sub-directory of Ansible playbooks or any?
TBH I am no longer using ansible-vault in my working place, your comments would be valuable :)
from vscode-ansible-vault.
My preferred setup is $workspace/ansibleprojects/project1/ansible.cfg, so one extra level.
It would be great if you can add support for that but I can work around it by opening the folders in the workspace directly.
from vscode-ansible-vault.
Related Issues (20)
- vault password file not found HOT 4
- Error when decrypting file HOT 5
- Support pyenv installs of ansible-vault HOT 2
- Problems with some special chars in password
- Feature request - ansible-vault view/edit HOT 1
- Windows: decoding fail when entering password HOT 2
- Feature - Encrypt_String HOT 2
- how do identify encoding encryption types?
- No longer functioning HOT 2
- Encryption fails if ansible fault file is specified in ansible.cfg HOT 4
- Extension doesn't recognize !vault tags
- Plugin not respecting ANSIBLE_VAULT_PASSWORD_FILE env variable?
- Command failed: ansible-vault decrypt
- ModuleNotFoundError: No module named 'ansible'
- GetPassWarning: Can not control echo on the terminal. HOT 2
- Proposal: deprecating extension HOT 2
- Password stored as plaintext
- Can't pass the vault password
- Feature Request: Support vault_password_file via ansible.cfg HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-ansible-vault.