Use when: encrypting secrets with Ansible Vault, adding vault-encrypted variables to group_vars, or managing sensitive configuration values within Ansible Vault for service deployments.
Scanned 9/1/2026
Install to Claude Code
npx -y skills add jimmybish/homelab --skill ansible-vault-secrets --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Ansible Vault Secrets?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/jimmybish-ansible-vault-secrets)More formats (shields.io, HTML) on the badges page.
---
name: ansible-vault-secrets
description: 'Use when: encrypting secrets with Ansible Vault, adding vault-encrypted variables to group_vars, or managing sensitive configuration values within Ansible Vault for service deployments.'
---
# Ansible Vault Secrets Management
Patterns for encrypting and storing secrets using Ansible Vault in the homelab environment.
## When to Use
- Encrypting API keys, passwords, or tokens for a service
- Adding vault-encrypted variables to `group_vars/all/vars.yaml`
- Setting up global variables for a new service deployment
## Encrypting a Secret
```bash
ansible-vault encrypt_string --vault-password-file ~/ansible_key 'secret_value' --name 'variable_name'
```
This outputs a vault-encrypted block that can be pasted directly into a vars file.
## Adding Global Variables
When deploying a new service, add its configuration to `group_vars/all/vars.yaml`:
```yaml
# <Service> Configuration
<service>_folder: "/etc/docker-storage/<service>"
internal_<service>_url: "https://<service>.{{ internal_domain }}"
homepage_<service>_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
<encrypted_key>
```
## Notes
- The vault password file is located at `~/ansible_key`
- If `~/ansible_key` is missing or unreadable, stop and tell the user before continuing; do not guess an alternative password file path
- All playbooks that use vault secrets must include `--vault-password-file ~/ansible_key`
- Never commit plain-text credentials — always use `ansible-vault encrypt_string`
- Vault-encrypted values are safe to commit to version control
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!