8000 GitHub - benjdudas/hashi_vault_lab
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

benjdudas/hashi_vault_lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hashi_vault_lab

Purpose:

This lab is intended for testing hashicorp vault integration with Ansible Automation Platform

Control Node Requirements:

Variable Options:

Kubernetes namespace can be set with the vault_namespace variable. By default this is set to the value of $(oc whoami | cut -f1 -d"@") + '-' + vault-lab

ansible-playbook deploy_vault.yml -e "vault_namespace=<my-namespace>"

Deploy Vault:

  1. Clone repo:
git clone https://github.com/benjdudas/hashi_vault_lab.git && cd ./hashi_vault_lab
  1. Install required Ansible Collections:
ansible-galaxy collection install -r ./collections/requirements.yml
  1. Deploy hashicorp vault:
ansible-playbook deploy_vault.yml

Initial Vault Setup After Deployment:

  1. Verify installation using:
/bin/sh -c 'oc get all -n $(oc whoami | cut -f1 -d"@")-vault-lab'
  1. Initialize Vault and save token/unseal keys to a local file token_seal:
/bin/sh -c 'oc exec -ti vault-0 -n $(oc whoami | cut -f1 -d"@")-vault-lab -- vault operator init |tee token_seal'
  1. Open Hashicorp Vault UI. To use the command below, json-query must be installed (sudo dnf install jq)
/bin/sh -c 'gio open http://$(oc get route vault-route -n $(oc whoami | cut -f1 -d"@")-vault-lab -o json | jq -r .spec.host)'
  1. Using 3 of the unseal keys listed in step 2, unseal Vault and login using the "Initial Root Token"

Cleanup Vault:

ansible-playbook delete_vault.yml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0