Rekey vault file ansible
Re-encrypt vault with a new password without exposing plaintext; rotate secrets safely
ansible-vault rekey vault.yml --new-vault-password-file new_pass.txt
more ansible
all 56 commands →
Multiple vault IDs with prompt
ansible-playbook site.yml --vault-id dev@dev_pass.txt --vault-id prod@prompt
Edit vault in place
EDITOR=vim ansible-vault edit group_vars/prod/secrets.yml --vault-password-file ~/.vault_pass
Dynamic inventory graph
ansible-inventory -i aws_ec2.yml --graph --vars
Inventory as YAML
ansible-inventory -i aws_ec2.yml --list --yaml > resolved_inventory.yml
Constructed keyed_groups
plugin: constructed
keyed_groups:
- key: tags.Role
prefix: role
- key: placement.region
prefix: region