For ansibile the built-in solution is: http://docs.ansible.com/ansible/playbooks_vault.html
Re:One in every 600 websites has .git exposed
by notduncansmith on Sunday July 26, 2015 @10:45PM
(#9953085)
Just wanted to +1 the suggestion for Vault - I've found it to be a really nice balance between usability and security.
It's relatively common to provision secrets with configuration management software like Chef/puppet/ansible/etc using, e.g. Chef's encrypted data bags.
Another slightly heavier-weight solution with some nice properties is to use a credential broker such as Vault: https://www.vaultproject.io/