patrickjahns / ansible-role-promtail

🔧 Ansible role for deploying promtail
MIT License
101 stars 59 forks source link

promtail_config_expand_env variable is wrong by default #187

Closed azhinu closed 11 months ago

azhinu commented 1 year ago

In defaults/main.yml variable promtail_config_expand_env have a string type. And condition in templates/service.j2 have no bool filter. As result with the default vars option -config.expand-env will be true. When promtail_config_expand_env is false without quotes, option -config.expand-env will be false.

Also templating -config.expand-env={{ "true" if promtail_config_expand_env else "false" }} can be simplified to -config.expand-env={{ promtail_config_expand_env | string }}

patrickjahns commented 1 year ago

Thank you for reporting this - if you send a pull request, I'd be happy to release a fixed version with your changes