feat(ansible): SOPS replaces ansible-vault, one secret store in git #380
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/sops-replaces-ansible-vault"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ansible's secrets move from ansible-vault to SOPS, so the repo has one secret store. rbw stays for passwords a human types.
What changes:
group_vars/<group>/vault.yml(4 files) becomevault.sops.yaml, loaded by thecommunity.sopsvars plugin (ansible.cfg,requirements.yml). Var names are unchanged, so no role reads anything new..sops.yamlgets a first rule foransible/*.sops.yamlwith two recipients: the main key, and a new Ansible-only key.ansible-vault-passforsops-age-key, which holds only the Ansible key. It cannot decrypt any Kubernetes Secret.sopsbinary from an init container (ghcr.io/getsops/sops:v3.11.0-alpine), since the semaphore image has none.sopsinstead ofansible-vault. The fourvault.yml.exampletemplates are gone.scripts/check-secret-store.py(inchecks) fails on ansible-vault ciphertext, an inline!vault, any ansible-vault instruction, or a*.sops.yamlwithout asops:block.Verification:
vault_*var, as Ansible resolves it per host: identical on all 17 inventory hosts before and after.apps/ansible-runner/secret.yaml.!vault, an instruction, a plaintextx.sops.yaml).site.yml --checkon the 12 hosts reachable without a sudo password: the PLAY RECAP and every changed task are identical before and after. The one failure on both sides is the login-password hash that is not set yet (next PR).kubectl kustomize appsbuilds.After merge: a manual runner job proves the init container and key in-cluster, then
~/.ansible-vault-passis deleted.https://claude.ai/code/session_012Wd941LKcWttC6KSG3VVVa