From cf38af1895dc75a0cf7dbfb36018acffae8e474a Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Thu, 10 Oct 2019 18:29:16 +0100 Subject: [PATCH] fix(tgtd.tmpl): fix `salt-lint` errors ```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}}{{ '' }} [206] Jinja variables should have spaces before and after: {{ var_name }} iscsi/target/config/files/default/tgtd.tmpl:22 {{shift}}{{ key }} {{ value }} ``` --- iscsi/target/config/files/default/tgtd.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iscsi/target/config/files/default/tgtd.tmpl b/iscsi/target/config/files/default/tgtd.tmpl index 67ced108..1be4bf32 100644 --- a/iscsi/target/config/files/default/tgtd.tmpl +++ b/iscsi/target/config/files/default/tgtd.tmpl @@ -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}}{{ '' }} +{{ shift }}{{ '' }} {% elif value is string or value is number %} -{{shift}}{{ key }} {{ value }} +{{ shift }}{{ key }} {{ value }} {%- endif %} {%- endmacro -%}