From home-lab-ops
Streamlines Ansible Vault secret management for the olympus cluster — scaffolds new secrets, validates vault references, and guides rotation workflows
npx claudepluginhub infiquetra/infiquetra-claude-plugins --plugin home-lab-opsThis skill uses the workspace's default tool permissions.
All secrets live in a single encrypted vault file:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
All secrets live in a single encrypted vault file:
ansible/inventory/group_vars/all/all.yml
This file is encrypted with Ansible Vault and requires ~/.vault_pass.txt to edit.
cd ansible
# Open for editing (decrypts in-place, re-encrypts on save)
ansible-vault edit inventory/group_vars/all/all.yml \
--vault-password-file ~/.vault_pass.txt
# View without editing
ansible-vault view inventory/group_vars/all/all.yml \
--vault-password-file ~/.vault_pass.txt
# Decrypt to plain text (CAREFUL — do not commit decrypted file)
ansible-vault decrypt inventory/group_vars/all/all.yml \
--vault-password-file ~/.vault_pass.txt
Convention: all vault variables are prefixed with vault_:
vault_<service>_<credential_type>: <secret_value>
# Examples:
vault_grafana_admin_password: supersecret
vault_pbs_api_token: user@pbs!tokenid=secret
vault_zeus_discord_token: Bot abc123xyz
vault_idrac_password: dell_root_password
ansible-vault edit inventory/group_vars/all/all.yml \
--vault-password-file ~/.vault_pass.txt
Add the new variable in the appropriate section. Keep related secrets grouped.
In the role's tasks/setup.yml, reference as {{ vault_<name> }}:
- name: Set service password
ansible.builtin.template:
src: config.yml.j2
dest: /etc/service/config.yml
vars:
password: "{{ vault_grafana_admin_password }}"
Or pass via environment variable in Docker Compose:
# In a template file
environment:
- GF_SECURITY_ADMIN_PASSWORD={{ vault_grafana_admin_password }}
defaults/main.yml# roles/<role>/defaults/main.yml
# Do NOT put real values here — this is for documentation only
grafana_admin_password: "{{ vault_grafana_admin_password }}"
When setting up a new service, these variables typically need to be vaulted:
| Service Type | Required Secrets |
|---|---|
| Monitoring exporter | vault_<exporter>_api_token, vault_<exporter>_password |
| Discord bot | vault_<agent_name>_discord_token |
| Proxmox API user | vault_proxmox_api_token_secret |
| PBS integration | vault_pbs_api_token |
| External service | vault_<service>_api_key |
| Database | vault_<db>_password, vault_<db>_root_password |
Verify every vault_* variable used in tasks has a corresponding vault entry:
# Find all vault variable references in roles:
grep -r "vault_" ansible/roles/ --include="*.yml" | grep -v "^#" | \
grep -oP 'vault_\w+' | sort -u
# Compare against what's in the vault:
ansible-vault view inventory/group_vars/all/all.yml \
--vault-password-file ~/.vault_pass.txt | grep "^vault_" | \
awk '{print $1}' | sort -u
Any variable in the first list but not the second needs to be added to the vault.
grep -r "vault_<old_var_name>" ansible/ --include="*.yml"
# Also check templates:
grep -r "vault_<old_var_name>" ansible/roles/*/templates/
(Log into the service — Grafana, PBS, Proxmox API, Discord portal, etc. — and rotate the credential there first)
ansible-vault edit inventory/group_vars/all/all.yml \
--vault-password-file ~/.vault_pass.txt
# Update the value
cd ansible
ansible-playbook -i inventory/hosts.yml service_vms.yml \
--tags <affected_service> \
--vault-password-file ~/.vault_pass.txt
Confirm the service is working with the new credential before committing.
See references/vault-patterns.md for the complete list of expected vault variables and their purpose.