Skip to content

Commit 9b71fcf

Browse files
Pascal Liehnealxwr
authored andcommitted
fix(logging): set replace=False and add dependencies for log files
1 parent d63581a commit 9b71fcf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

openvpn/config.sls

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ openvpn_{{ type }}_{{ name }}_log_file:
168168
file.managed:
169169
- name: {{ config.log }}
170170
- makedirs: True
171+
- replace: False
171172
{{ _permissions(640) }}
173+
- require_in:
174+
{%- if map.multi_services %}
175+
- service: openvpn_{{name}}_service
176+
{%- else %}
177+
- service: openvpn_service
178+
{%- endif %}
172179
{% endif %}
173180
174181
{% if config.log_append is defined %}
@@ -177,7 +184,14 @@ openvpn_{{ type }}_{{ name }}_log_file_append:
177184
file.managed:
178185
- name: {{ config.log_append }}
179186
- makedirs: True
187+
- replace: False
180188
{{ _permissions(640) }}
189+
- require_in:
190+
{%- if map.multi_services %}
191+
- service: openvpn_{{name}}_service
192+
{%- else %}
193+
- service: openvpn_service
194+
{%- endif %}
181195
{% endif %}
182196
183197
{% if config.client_config_dir is defined %}

0 commit comments

Comments
 (0)