add standalone vault script
This commit is contained in:
parent
4f0cbd186c
commit
66276c543f
11
Readme.md
Normal file
11
Readme.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# homelab
|
||||||
|
|
||||||
|
|
||||||
|
## rebuild
|
||||||
|
to rebuild from scratch ansible need a vault server up and unseal
|
||||||
|
you can rebuild a standalone vault srver with a consul database snaphot with
|
||||||
|
|
||||||
|
```
|
||||||
|
make vault-dev FILE=./yourconsulsnaphot.snap
|
||||||
|
```
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
CONSUL_HTTP_ADDR=http://127.0.0.1:8500
|
CONSUL_HTTP_ADDR=http://127.0.0.1:8500
|
||||||
|
ANSIBLE_POLICY="ansible"
|
||||||
echo "launch consul dev server"
|
echo "launch consul dev server"
|
||||||
nohup consul agent -dev &
|
nohup consul agent -dev &
|
||||||
if [ "$1" ]; then
|
if [ "$1" ]; then
|
||||||
@ -27,4 +27,5 @@ ui= true
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "starting vault server please unseal before use "
|
echo "starting vault server please unseal before use "
|
||||||
vault server -config "/tmp/standalone-vault-dev.hcl"
|
nohup vault server -config "/tmp/standalone-vault-dev.hcl" &
|
||||||
|
vault token create -policy=$ANSIBLE_POLICY -display-name=rebuild-token
|
||||||
|
Loading…
Reference in New Issue
Block a user