Set variable from config file


I am trying to configure the discourse dashboard via Ansible (or any means that involves editing files, passing ENV and not using the web interface). When I stick the dashboard in provisioning/dashboards the dashboard shows up, but fails because datasource named "${DS_PROMETHEUS}", is not found.

If I import the Dashboard from the web interface I can correctly connect the Dashboard to the datasource and it works fine. How can I define DS_PROMETHEUS by modifying the datasource.yml or passing an environment variable (or doing it some other way that I cannot imagine)?


Well, I don’t know if there is a way to do what I was trying to do. What I ended up doing was to export the JSON of the configured Dashboard and use that. I don’t like that this solution won’t be able to pull in any future changes of that dashboard, but it hasn’t changed in a year, so it’s probably not a big loss.