techno-tim / k3s-ansible

The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.
https://technotim.live/posts/k3s-etcd-ansible/
Apache License 2.0
2.41k stars 1.05k forks source link

[Security Recommendation and troubleshooting] Integration of ansible vault to secure k3s token and other credentials #479

Closed derhornspieler closed 6 months ago

derhornspieler commented 7 months ago

Currently attempting to pass a variable in using "{{ token }}" and for the life of me cannot understand why ansible is throwing an error trying to pull it. I've defined the vault file in my ansible.cfg. I think showing users a secure approach to storing credentials, even for homelabs, will go a long way in our fight against cyber criminals.

Expected Behavior

adding the --ask-vault-password should allow for the vault to supply the k3s_token in the all.yml file. Can't figure out what I'm missing for it to keep failing.

Current Behavior

Steps to Reproduce