Skip to content

Commit 1b3f7f6

Browse files
committed
fix(config.sls): fix salt-lint errors
```bash Examining openvpn/config.sls of type state [204] Lines should be no longer that 160 chars openvpn/config.sls:30 {% set config_file = "{0}/openvpn_{1}.conf".format(config_dir, name) if map.multi_services and grains['os_family'] == 'FreeBSD' else "{0}/{1}.{2}".format(config_dir, name, map.conf_ext) %} [206] Jinja variables should have spaces before and after: {{ var_name }} openvpn/config.sls:166 - service: openvpn_{{name}}_service [206] Jinja variables should have spaces before and after: {{ var_name }} openvpn/config.sls:182 - service: openvpn_{{name}}_service [206] Jinja variables should have spaces before and after: {{ var_name }} openvpn/config.sls:198 - service: openvpn_{{name}}_service [206] Jinja variables should have spaces before and after: {{ var_name }} openvpn/config.sls:208 - name: {{ config_dir }}/{{ config.client_config_dir}} [206] Jinja variables should have spaces before and after: {{ var_name }} openvpn/config.sls:213 - service: openvpn_{{name}}_service [206] Jinja variables should have spaces before and after: {{ var_name }} openvpn/config.sls:222 - name: {{ config_dir }}/{{ config.client_config_dir}}/{{ client }} ```
1 parent edb4806 commit 1b3f7f6

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

openvpn/config.sls

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ include:
2727
{%- set config_dir = map.get(type, {}).get("conf_dir", map.conf_dir) %}
2828
{%- endif %}
2929
30-
{% set config_file = "{0}/openvpn_{1}.conf".format(config_dir, name) if map.multi_services and grains['os_family'] == 'FreeBSD' else "{0}/{1}.{2}".format(config_dir, name, map.conf_ext) %}
30+
{%- set config_file = "{0}/openvpn_{1}.conf".format(
31+
config_dir,
32+
name,
33+
) if map.multi_services and grains['os_family'] == 'FreeBSD' else "{0}/{1}.{2}".format(
34+
config_dir,
35+
name,
36+
map.conf_ext,
37+
) %}
3138
3239
# Deploy {{ type }} {{ name }} config files
3340
openvpn_config_{{ type }}_{{ name }}:
@@ -163,7 +170,7 @@ openvpn_{{ type }}_{{ name }}_status_file:
163170
{{ _permissions(600, 'root', 0) }} # different group names on FreeBSD and Debian/Ubuntu
164171
- watch_in:
165172
{%- if map.multi_services %}
166-
- service: openvpn_{{name}}_service
173+
- service: openvpn_{{ name }}_service
167174
{%- else %}
168175
- service: openvpn_service
169176
{%- endif %}
@@ -179,7 +186,7 @@ openvpn_{{ type }}_{{ name }}_log_file:
179186
{{ _permissions(640, map.log_user) }}
180187
- require_in:
181188
{%- if map.multi_services %}
182-
- service: openvpn_{{name}}_service
189+
- service: openvpn_{{ name }}_service
183190
{%- else %}
184191
- service: openvpn_service
185192
{%- endif %}
@@ -195,7 +202,7 @@ openvpn_{{ type }}_{{ name }}_log_file_append:
195202
{{ _permissions(640, map.log_user) }}
196203
- require_in:
197204
{%- if map.multi_services %}
198-
- service: openvpn_{{name}}_service
205+
- service: openvpn_{{ name }}_service
199206
{%- else %}
200207
- service: openvpn_service
201208
{%- endif %}
@@ -205,12 +212,12 @@ openvpn_{{ type }}_{{ name }}_log_file_append:
205212
# Ensure client config dir exists
206213
openvpn_config_{{ type }}_{{ name }}_client_config_dir:
207214
file.directory:
208-
- name: {{ config_dir }}/{{ config.client_config_dir}}
215+
- name: {{ config_dir }}/{{ config.client_config_dir }}
209216
{{ _permissions(750, 'root') }}
210217
- makedirs: True
211218
- watch_in:
212219
{%- if map.multi_services %}
213-
- service: openvpn_{{name}}_service
220+
- service: openvpn_{{ name }}_service
214221
{%- else %}
215222
- service: openvpn_service
216223
{%- endif %}
@@ -219,7 +226,7 @@ openvpn_config_{{ type }}_{{ name }}_client_config_dir:
219226
# Client config for {{ client }}
220227
openvpn_config_{{ type }}_{{ name }}_{{ client }}_client_config:
221228
file.managed:
222-
- name: {{ config_dir }}/{{ config.client_config_dir}}/{{ client }}
229+
- name: {{ config_dir }}/{{ config.client_config_dir }}/{{ client }}
223230
{{ _permissions(640, 'root') }}
224231
- contents_pillar: openvpn:{{ type }}:{{ name }}:client_config:{{ client }}
225232
- makedirs: True

0 commit comments

Comments
 (0)