HeavyHorst / remco

remco is a lightweight configuration management tool

Home Page:https://heavyhorst.github.io/remco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boolean type

freeseacher opened this issue · comments

In #33 we got support for aditional types other that strings.
Now i have such a config

...
    enabled_rules:
      team: False
      product: No

and if

  {% if enabled_rules.team | yesno %}
  - {{ enabled_rules.team }}/*.yml
  {% endif %}

And that if is always true. That is frustrating.
diagnosis with

  {{ enabled_rules | toJSON }}
  {{ enabled_rules.team | yesno }}

leave me with

  {"product":"false","team":"false"}
  yes
% remco --version 
remco Version: 0.12.0-beta.2
UTC Build Time: 2019-11-05-15:43:39
Git Commit Hash: 85fa5258e0cc5ad50ab957ea2ea9bcada48b7125+CHANGES
Go Version: go1.13.4
Go OS/Arch: linux/amd64

Could you try:

  {% if enabled_rules.team == "false" %}
  - {{ enabled_rules.team }}/*.yml
  {% endif %}

ok. that work. tnx