Password script

This last example uses a password script. This is useful for designing a system where a password can be stored in a central system for storing credentials and shared with contributors to the playbook tree. Each contributor could have his or her own password to the shared credentials store, where the Vault password would be retrieved from. Our example will be far more straightforward: just a simple output to STDOUT with a password. This file will be saved as password.sh. The file needs to be marked as an executable for Ansible to treat it as such, as shown in the following screenshot:

Try this for yourself and see how it works—you should find that ansible-vault creates a Vault with the password a long password, as written to STDOUT by the script. You could even try editing using the following command:

ansible-vault edit --vault-id @prompt even_more_secrets.yaml

You should now see enter a long password when prompted—and you can now edit the Vault successfully!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.41.187