Skip to content
Discussion options

You must be logged in to vote

Never store secrets in plain text, especially not in a Git repo (even a private one).

The best tool for this is indeed Ansible Vault. It’s actually very beginner-friendly:

Encryption: You can encrypt just one variable or an entire file using ansible-vault encrypt credentials.yml. You’ll be asked for a password.

Usage: When you run your playbook, you just add the flag --ask-vault-pass, and Ansible will decrypt the secrets in memory during the execution.

Security Tip: For your HomeLab, you can store your Vault password in a local file (outside of your Git folder) and use the --vault-password-file flag to automate the process without typing the password every time.

Alternative: If you wan…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 0xBAD-B0T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants