Skip to content

Commit

Permalink
fix(logging): set replace=False and add dependencies for log files
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Liehne authored and alxwr committed Jul 13, 2019
1 parent d63581a commit 9b71fcf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions openvpn/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ openvpn_{{ type }}_{{ name }}_log_file:
file.managed:
- name: {{ config.log }}
- makedirs: True
- replace: False
{{ _permissions(640) }}
- require_in:
{%- if map.multi_services %}
- service: openvpn_{{name}}_service
{%- else %}
- service: openvpn_service
{%- endif %}
{% endif %}
{% if config.log_append is defined %}
Expand All @@ -177,7 +184,14 @@ openvpn_{{ type }}_{{ name }}_log_file_append:
file.managed:
- name: {{ config.log_append }}
- makedirs: True
- replace: False
{{ _permissions(640) }}
- require_in:
{%- if map.multi_services %}
- service: openvpn_{{name}}_service
{%- else %}
- service: openvpn_service
{%- endif %}
{% endif %}
{% if config.client_config_dir is defined %}
Expand Down

0 comments on commit 9b71fcf

Please sign in to comment.