paulbsd-salt/states/openvpn_client/config.sls

33 lines
859 B
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
---
2020-07-10 01:56:49 +02:00
{%- from "openvpn_client/map.jinja" import openvpn_client with context %}
2020-07-10 00:58:55 +02:00
openvpn-client-main-config:
file.managed:
2020-07-10 01:56:49 +02:00
- name: {{ openvpn_client.config_dir }}/vpn.conf
2022-12-17 23:34:54 +01:00
- source: salt://openvpn_client/templates/vpn.conf.j2
2020-07-10 00:58:55 +02:00
- user: root
- group: root
- mode: 0600
- template: jinja
- watch_in:
- service: openvpn-client-service
openvpn-client-private-dir:
file.directory:
2020-07-10 01:56:49 +02:00
- name: {{ openvpn_client.config_dir }}/private
2020-07-10 00:58:55 +02:00
- user: root
- group: root
- mode: 0700
- watch_in:
- service: openvpn-client-service
openvpn-client-private-access:
file.managed:
2020-07-10 01:56:49 +02:00
- name: {{ openvpn_client.config_dir }}/private/pass
2022-12-17 23:34:54 +01:00
- source: salt://openvpn_client/templates/pass.j2
2020-07-10 00:58:55 +02:00
- template: jinja
- user: root
- group: root
- mode: 0600
- watch_in:
2020-07-10 01:56:49 +02:00
- service: openvpn-client-service