Skip to content

Commit

Permalink
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 committed Nov 30, 2018
1 parent 5d4b1a8 commit fc459c5
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 fc459c5

Please sign in to comment.