Skip to content

Commit

Permalink
fix(tgtd.tmpl): fix salt-lint errors
Browse files Browse the repository at this point in the history
```bash
Examining iscsi/target/config/files/default/tgtd.tmpl of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/tgtd.tmpl:17
{{shift}}{{ '<' ~  key ~ '>' }}

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/tgtd.tmpl:19
{{shift}}{{ '</' ~ key.split(" ")[0] ~ '>' }}

[206] Jinja variables should have spaces before and after: {{ var_name }}
iscsi/target/config/files/default/tgtd.tmpl:22
{{shift}}{{ key }} {{ value }}
```
  • Loading branch information
myii committed Oct 10, 2019
1 parent 94c95f5 commit cf38af1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iscsi/target/config/files/default/tgtd.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
{%- macro tgtd(key, value, spaces=0, last=False) -%}
{%- set shift = spaces * ' ' -%}
{%- if value is mapping %}
{{shift}}{{ '<' ~ key ~ '>' }}
{{ shift }}{{ '<' ~ key ~ '>' }}
{{ readconf(value, spaces|int+4) }}
{{shift}}{{ '</' ~ key.split(" ")[0] ~ '>' }}
{{ shift }}{{ '</' ~ key.split(" ")[0] ~ '>' }}

{% elif value is string or value is number %}
{{shift}}{{ key }} {{ value }}
{{ shift }}{{ key }} {{ value }}
{%- endif %}
{%- endmacro -%}

Expand Down

0 comments on commit cf38af1

Please sign in to comment.