Is there a template function that can read the contents of a file and (optionally) stripping last newline of the file?
The reason being we want to use the Docker Swarm Secrets function, which will pass the 'secret values' as individual files under /run/secrets