From bedc1b6c90ecdcacc2564f95144e30452a99c861 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 9 Oct 2019 14:41:12 +0100 Subject: [PATCH] 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))}} ``` --- nginx/certificates.sls | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nginx/certificates.sls b/nginx/certificates.sls index e088dd2..d47f3e3 100644 --- a/nginx/certificates.sls +++ b/nginx/certificates.sls @@ -37,21 +37,21 @@ nginx_{{ domain }}_ssl_certificate: - name: {{ certificates_path }}/{{ domain }}.crt - makedirs: True {% 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 %} - contents_pillar: nginx:certificates:{{ domain }}:public_cert {% endif %} - watch_in: - 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: file.managed: - name: {{ certificates_path }}/{{ domain }}.key - mode: 600 - makedirs: True {% 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 %} - contents_pillar: nginx:certificates:{{ domain }}:private_key {% endif %}