paulbsd-salt/states/openvpn_client/config.sls
2020-07-10 00:58:55 +02:00

32 lines
802 B
Plaintext

---
{%- from "openvpn_client/map.jinja" import openvpn with context %}
openvpn-client-main-config:
file.managed:
- name: {{ openvpn.config_dir }}/vpn.conf
- source: salt://openvpn_client/vpn.conf.j2
- user: root
- group: root
- mode: 0600
- template: jinja
- watch_in:
- service: openvpn-client-service
openvpn-client-private-dir:
file.directory:
- name: {{ openvpn.config_dir }}/vpn
- user: root
- group: root
- mode: 0700
- watch_in:
- service: openvpn-client-service
openvpn-client-private-access:
file.managed:
- name: {{ openvpn.config_dir }}/vpn/pass
- source: salt://openvpn_client/pass.j2
- template: jinja
- user: root
- group: root
- mode: 0600
- watch_in:
- service: openvpn-client-service