Procházet zdrojové kódy

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

```bash
Examining nginx/certificates.sls of type state
[206] Jinja variables should have spaces before and after: {{ var_name }}
nginx/certificates.sls:40
    - contents_pillar: {{salt['pillar.get']('nginx:certificates:{}:public_cert_pillar'.format(domain))}}

[202] Jinja statement should have spaces before and after: {% statement %}
nginx/certificates.sls:47
{% if salt['pillar.get']("nginx:certificates:{}:private_key".format(domain)) or salt['pillar.get']("nginx:certificates:{}:private_key_pillar".format(domain))%}

[206] Jinja variables should have spaces before and after: {{ var_name }}
nginx/certificates.sls:54
    - contents_pillar: {{salt['pillar.get']('nginx:certificates:{}:private_key_pillar'.format(domain))}}
```
tags/v2.3.1
Imran Iqbal před 5 roky
rodič
revize
bedc1b6c90
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. +3
    -3
      nginx/certificates.sls

+ 3
- 3
nginx/certificates.sls Zobrazit soubor

- name: {{ certificates_path }}/{{ domain }}.crt - name: {{ certificates_path }}/{{ domain }}.crt
- makedirs: True - makedirs: True
{% if salt['pillar.get']("nginx:certificates:{}:public_cert_pillar".format(domain)) %} {% if salt['pillar.get']("nginx:certificates:{}:public_cert_pillar".format(domain)) %}
- contents_pillar: {{salt['pillar.get']('nginx:certificates:{}:public_cert_pillar'.format(domain))}}
- contents_pillar: {{ salt['pillar.get']('nginx:certificates:{}:public_cert_pillar'.format(domain)) }}
{% else %} {% else %}
- contents_pillar: nginx:certificates:{{ domain }}:public_cert - contents_pillar: nginx:certificates:{{ domain }}:public_cert
{% endif %} {% endif %}
- watch_in: - watch_in:
- service: nginx_service - service: nginx_service


{% if salt['pillar.get']("nginx:certificates:{}:private_key".format(domain)) or salt['pillar.get']("nginx:certificates:{}:private_key_pillar".format(domain))%}
{% if salt['pillar.get']("nginx:certificates:{}:private_key".format(domain)) or salt['pillar.get']("nginx:certificates:{}:private_key_pillar".format(domain)) %}
nginx_{{ domain }}_ssl_key: nginx_{{ domain }}_ssl_key:
file.managed: file.managed:
- name: {{ certificates_path }}/{{ domain }}.key - name: {{ certificates_path }}/{{ domain }}.key
- mode: 600 - mode: 600
- makedirs: True - makedirs: True
{% if salt['pillar.get']("nginx:certificates:{}:private_key_pillar".format(domain)) %} {% if salt['pillar.get']("nginx:certificates:{}:private_key_pillar".format(domain)) %}
- contents_pillar: {{salt['pillar.get']('nginx:certificates:{}:private_key_pillar'.format(domain))}}
- contents_pillar: {{ salt['pillar.get']('nginx:certificates:{}:private_key_pillar'.format(domain)) }}
{% else %} {% else %}
- contents_pillar: nginx:certificates:{{ domain }}:private_key - contents_pillar: nginx:certificates:{{ domain }}:private_key
{% endif %} {% endif %}

Načítá se…
Zrušit
Uložit