Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apayu/nvim-ansible-vault
A Neovim plugin for handling Ansible vault encrypted files.
https://github.com/apayu/nvim-ansible-vault
ansible neovim
Last synced: 3 days ago
JSON representation
A Neovim plugin for handling Ansible vault encrypted files.
- Host: GitHub
- URL: https://github.com/apayu/nvim-ansible-vault
- Owner: apayu
- Created: 2024-11-13T02:24:25.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-13T08:14:40.000Z (3 months ago)
- Last Synced: 2024-12-09T04:12:07.869Z (about 2 months ago)
- Topics: ansible, neovim
- Language: Lua
- Homepage:
- Size: 2.93 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nvim-ansible-vault
A Neovim plugin for handling Ansible vault encrypted files.
## Features
- Automatically detects Ansible vault encrypted files
- Decrypts vault files using vault password file
- Supports saving encrypted files with `:w` command
- Maintains encryption when saving files
- Supports custom vault password file patterns
- Integrates with Ansible vault commands## Installation
Using [lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{
"apayu/nvim-ansible-vault",
config = function()
require("ansible-vault").setup({
-- Optional custom configuration
vault_password_files = {'.vault_pass', '.vault-pass'},
patterns = {'*/host_vars/*/vault.yml', '*/group_vars/*/vault.yml'},
vault_id = 'default'
})
end,
event = "BufReadPre */vault.yml", -- Load only when opening vault files
}
```## Configuration
Default configuration:
```lua
{
-- Patterns for vault password files to look for
vault_password_files = {'.vault_pass', '.vault-pass'},-- File patterns to trigger the plugin
patterns = {'*/host_vars/*/vault.yml', '*/group_vars/*/vault.yml'},-- Default vault ID to use
vault_id = 'default'
}
```## Requirements
- Neovim >= 0.8.0
- Ansible vault command line tool## Usage
1. Place your vault password in a `.vault_pass` or `.vault-pass` file in your project directory
2. Open an encrypted vault file
3. The plugin will automatically detect and decrypt the file
4. Edit the file normally
5. Save with `:w` to encrypt and save the file## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.