Sfoglia il codice sorgente

fix(services.sls): fix `salt-lint` errors

```bash
Examining ufw/config/services.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:32
ufw-svc-{{method}}-{{service_name}}-{{from_addr}}:

[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:33
  ufw.{{method}}:

[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:35
    - protocol: {{protocol}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:38
    - from_addr: {{from_addr}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:41
    - from_port: "{{from_port}}"

[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:44
    - to_addr: {{to_addr}}

[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:49
    - comment: '"{{comment}}"'

[206] Jinja variables should have spaces before and after: {{ var_name }}
ufw/config/services.sls:51
    - to_port: "{{to_port}}"
```
tags/v0.5.2
Imran Iqbal 5 anni fa
parent
commit
afddcf6fa8
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 8 aggiunte e 8 eliminazioni
  1. +8
    -8
      ufw/config/services.sls

+ 8
- 8
ufw/config/services.sls Vedi File

@@ -29,26 +29,26 @@ include:
{%- set to_port = service_details.get('to_port', service_name) %}
{%- set comment = service_details.get('comment', None) %}

ufw-svc-{{method}}-{{service_name}}-{{from_addr}}:
ufw.{{method}}:
ufw-svc-{{ method }}-{{ service_name }}-{{ from_addr }}:
ufw.{{ method }}:
{%- if protocol is not none %}
- protocol: {{protocol}}
- protocol: {{ protocol }}
{%- endif %}
{%- if from_addr is not none %}
- from_addr: {{from_addr}}
- from_addr: {{ from_addr }}
{%- endif %}
{%- if from_port is not none %}
- from_port: "{{from_port}}"
- from_port: "{{ from_port }}"
{%- endif %}
{%- if to_addr is not none %}
- to_addr: {{to_addr}}
- to_addr: {{ to_addr }}
{%- endif %}
# Debian Jessie doesn't implement the **comment** directive
# CentOS-6 throws an UTF-8 error
{%- if comment is not none and salt['grains.get']('osfinger') != 'Debian-8' and salt['grains.get']('osfinger') != 'CentOS-6' %}
- comment: '"{{comment}}"'
- comment: '"{{ comment }}"'
{%- endif %}
- to_port: "{{to_port}}"
- to_port: "{{ to_port }}"
- listen_in:
- cmd: reload-ufw


Loading…
Annulla
Salva