Skip to content

Commit

Permalink
fix(lio.tmpl): fix salt-lint errors
Browse files Browse the repository at this point in the history
```bash
Examining iscsi/target/config/files/default/lio.tmpl of type state
[209] Jinja comment should have spaces before and after: {# comment #}
iscsi/target/config/files/default/lio.tmpl:1
{#######################################################}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:3
{#   salt://iscsi/target/config/files/default/lio.tmpl #}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:4
{# Your changes may get overwritten.                   #}

[209] Jinja comment should have spaces before and after: {# comment #}
iscsi/target/config/files/default/lio.tmpl:5
{#######################################################}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:7
{% set arrays = ('fabric_modules', 'storage_objects', 'alua_tpgs', 'targets', 'node_acls', 'luns', 'mapped_luns', 'portals')%}

[202] Jinja statement should have spaces before and after: {% statement %}
iscsi/target/config/files/default/lio.tmpl:7
{% set arrays = ('fabric_modules', 'storage_objects', 'alua_tpgs', 'targets', 'node_acls', 'luns', 'mapped_luns', 'portals')%}

[201] Trailing whitespace
iscsi/target/config/files/default/lio.tmpl:32
{{ '\n' ~ shift ~ '}' if last and parent|lower in ('tpgs',) else '' -}}
```
  • Loading branch information
myii committed Oct 10, 2019
1 parent 36922cc commit 94c95f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions iscsi/target/config/files/default/lio.tmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{#######################################################}
{# ################################################### #}
{# File managed by Salt at: #}
{# salt://iscsi/target/config/files/default/lio.tmpl #}
{# Your changes may get overwritten. #}
{#######################################################}
{# salt://iscsi/target/config/files/default/lio.tmpl #}
{# Your changes may get overwritten. #}
{# ################################################### #}

{% set arrays = ('fabric_modules', 'storage_objects', 'alua_tpgs', 'targets', 'node_acls', 'luns', 'mapped_luns', 'portals')%}
{% set arrays = ('fabric_modules', 'storage_objects', 'alua_tpgs', 'targets', 'node_acls', 'luns', 'mapped_luns', 'portals') %}

{%- if data and component -%}

Expand All @@ -29,7 +29,7 @@
{{ shift ~ ' }' if last else shift ~ ' },\n' }}
{%- elif value is string or value is number %}
{{ shift }}"{{ key }}": {{ '' if value is number else '"' }}{{ value }}{{ '' if value is number else '"' }}{{ '' if last else ',' -}}
{{ '\n' ~ shift ~ '}' if last and parent|lower in ('tpgs',) else '' -}}
{{ '\n' ~ shift ~ '}' if last and parent|lower in ('tpgs',) else '' -}}
{%- endif %}
{%- endmacro -%}

Expand Down

0 comments on commit 94c95f5

Please sign in to comment.