Skip to content

Commit f220886

Browse files
committed
fix(named.conf.logging.jinja): fix salt-lint errors
```bash Examining bind/files/named.conf.logging.jinja of type state [206] Jinja variables should have spaces before and after: {{ var_name }} bind/files/named.conf.logging.jinja:6 channel {{channel}} { [201] Trailing whitespace bind/files/named.conf.logging.jinja:8 file "{{ map.log_dir }}/{{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file')}}" versions {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3')}} size {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m')}}; [204] Lines should be no longer that 160 chars bind/files/named.conf.logging.jinja:8 file "{{ map.log_dir }}/{{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file')}}" versions {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3')}} size {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m')}}; [206] Jinja variables should have spaces before and after: {{ var_name }} bind/files/named.conf.logging.jinja:8 file "{{ map.log_dir }}/{{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file')}}" versions {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3')}} size {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m')}}; [206] Jinja variables should have spaces before and after: {{ var_name }} bind/files/named.conf.logging.jinja:20 severity {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':severity')}}; [206] Jinja variables should have spaces before and after: {{ var_name }} bind/files/named.conf.logging.jinja:23 syslog {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':syslog')}}; [206] Jinja variables should have spaces before and after: {{ var_name }} bind/files/named.conf.logging.jinja:29 category {{category}} { {{ salt['pillar.get']('bind:config:use_extensive_logging:category:'+category, []) | join('; ') }}; }; ```
1 parent 67736a2 commit f220886

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bind/files/named.conf.logging.jinja

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
logging {
44

55
{% for channel in salt['pillar.get']('bind:config:use_extensive_logging:channel') %}
6-
channel {{channel}} {
6+
channel {{ channel }} {
77
{%- if salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file', False) %}
8-
file "{{ map.log_dir }}/{{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file')}}" versions {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3')}} size {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m')}};
8+
{%- set channel_file = salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':file') %}
9+
{%- set channel_versions = salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':versions', '3') %}
10+
{%- set channel_size = salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':size', '20m') %}
11+
file "{{ map.log_dir }}/{{ channel_file }}" versions {{ channel_versions }} size {{ channel_size }};
912
{%- endif %}
1013
{%- if salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':print-time') %}
1114
print-time yes;
@@ -17,16 +20,16 @@ logging {
1720
print-severity yes;
1821
{%- endif %}
1922
{%- if salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':severity') %}
20-
severity {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':severity')}};
23+
severity {{ salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':severity') }};
2124
{%- endif %}
2225
{%- if salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':syslog') %}
23-
syslog {{salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':syslog')}};
26+
syslog {{ salt['pillar.get']('bind:config:use_extensive_logging:channel:'+channel+':syslog') }};
2427
{%- endif %}
2528
};
2629
{% endfor %}
2730

2831
{%- for category in salt['pillar.get']('bind:config:use_extensive_logging:category') %}
29-
category {{category}} { {{ salt['pillar.get']('bind:config:use_extensive_logging:category:'+category, []) | join('; ') }}; };
32+
category {{ category }} { {{ salt['pillar.get']('bind:config:use_extensive_logging:category:'+category, []) | join('; ') }}; };
3033

3134
{%- endfor %}
3235

0 commit comments

Comments
 (0)