Recommended way of storing credentials in Beats configuration file?

Now, the best solution will be to stick to using keystore content especially for passwords.

For something like
cat /file/containing/setting/value | filebeat keystore add ES_PWD --stdin --force
and then use it in the yml file:
output.elasticsearch.password: "${ES_PWD}"

How to use that in ansible, I don't want to reinvent the wheel.
Here you should find a working example, you just need to translate it from kibana to filebeat command style:

The similar should be possible with a remote exec provisioner:

1 Like