Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szkiba/xk6-ansible-vault
A k6 extension enables to encrypt and decrypt ansible vaults
https://github.com/szkiba/xk6-ansible-vault
k6-extension xk6
Last synced: about 2 months ago
JSON representation
A k6 extension enables to encrypt and decrypt ansible vaults
- Host: GitHub
- URL: https://github.com/szkiba/xk6-ansible-vault
- Owner: szkiba
- License: mit
- Created: 2021-05-12T12:47:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T10:26:59.000Z (3 months ago)
- Last Synced: 2024-06-20T03:55:55.121Z (3 months ago)
- Topics: k6-extension, xk6
- Language: JavaScript
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xk6-ansible-vault
A k6 extension enables k6 tests to comfortably encrypt and decrypt ansible vault values.
Using ansible vault in tests makes possible to publish secrets with tests in a safe way.
The vault password can be pass as environment variable when test run.The underlying implementation is https://github.com/sosedoff/ansible-vault-go
Built for [k6](https://go.k6.io/k6) using [xk6](https://github.com/grafana/xk6).
## Usage
Import an entire module's contents:
```JavaScript
import * as vault from "k6/x/ansible-vault";
```Import a single export from a module:
```JavaScript
import { encrypt, decrypt } from "k6/x/ansible-vault";
```## API
Functions:
- [encrypt](docs/README.md#encrypt)
- [decrypt](docs/README.md#decrypt)For complete API documentation click [here](docs/README.md)!
## Build
To build a `k6` binary with this extension, first ensure you have the prerequisites:
- [Go toolchain](https://go101.org/article/go-toolchain.html)
- GitThen:
1. Install `xk6`:
```bash
$ go install go.k6.io/xk6/cmd/xk6@latest
```2. Build the binary:
```bash
$ xk6 build --with github.com/szkiba/xk6-ansible-vault@latest
```