Ansible files may often contain different secret strings e.g. passwords, tokens, keys etc., and the good practice is not to store them in a plain text but to encrypt them.
This is especially important if your Ansible files are tracked in a source control system.
This note shows the examples of how to encrypt and decrypt a string using Ansible vault. (more…)