A collection of roles to generate templated secrets from HashiCorp Vault.
Common tasks to perform operations on HashiCorp Vault.
Specifics for Kubernetes resources.
Add to requirements.yml
:
collections:
- name: adfinis.vault_mapper
version: 1.0.0
Install requirements:
apt install python3-hvac
ansible-galaxy collection install -r requirements.yml
See playbook.yaml
and templates/
in example/
Playbook execution is local and will create manifests in ./generated/to_k8s/{{ system }}
directory. At end of playbook execution, it will display commands to execute for applying or inspecting the generated resources:
TASK [to_k8s : Commands for dev] ***************************************************************************************************************************
ok: [localhost] => {
"msg": [
"Compare: kubectl diff -k generated/to_k8s/dev",
"Apply dry run: kubectl apply -k generated/to_k8s/dev --dry-run=server",
"Apply: kubectl apply -k generated/to_k8s/dev"
]
}
The Ansible collection adfinis.vault_mapper
was written by: