Skip to content

A k6 extension enables to encrypt and decrypt ansible vaults

License

Notifications You must be signed in to change notification settings

szkiba/xk6-ansible-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7d4de40 · Jun 10, 2024

History

10 Commits
May 12, 2021
May 12, 2021
May 12, 2021
May 12, 2021
May 12, 2021
May 12, 2021
Aug 24, 2021
Mar 12, 2023
Jun 10, 2024
Jun 10, 2024
May 12, 2021
May 12, 2021
May 12, 2021
May 12, 2021
May 12, 2021
Mar 12, 2023

Repository files navigation

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 using xk6.

Usage

Import an entire module's contents:

import * as vault from "k6/x/ansible-vault";

Import a single export from a module:

import { encrypt, decrypt } from "k6/x/ansible-vault";

API

Functions:

For complete API documentation click here!

Build

To build a k6 binary with this extension, first ensure you have the prerequisites:

Then:

  1. Install xk6:
$ go install go.k6.io/xk6/cmd/xk6@latest
  1. Build the binary:
$ xk6 build --with github.com/szkiba/xk6-ansible-vault@latest