Closed FabianVolkers closed 2 years ago
It's more like someone copy-pasted the original configuration, which contains Golang templates.
For us, it needs to be escaped to not clash with our Jinja2 templates, however.
Wrapping these things in {% raw %}
and {% endraw %}
is the proper solution.
Thanks for reporting this! :+1:
Hey there,
I tried to deploy the matrix go-neb bot with alertmanager configuration today using the instructions at
docs/configuring-playbook-bot-go-neb.md
.Expected behaviour
The go-neb bot is completely installed and able to communicate with an alertmanager instance.
Actual behaviour
During the first run, everything seemed to work fine, but I had some configuration errors. When I attempted to redeploy the service, ansible returned the following error:
Problem
Ansible appears to attempt to template the go template string in the alertmanager configuration.
Mitigation
I managed to mitigate the issue by escaping all of the curly brackets in the template in
matrix.example.com/vars.yml
. A better solution should be using jinja's{% raw %}
expression syntax wrapped around the entire template string, but I could not get it to work in this case.The relevant section in the README begins at line 201.
I'm wondering if this was a mistake on my side during the execution of the ansible-playbook or if this is something that should be added to the documentation to help people in the future.
Steps to reproduce
Environment