paulbsd-salt/states/openvpn_client/config.sls

33 lines
839 B
Plaintext

---
{%- from "openvpn_client/map.jinja" import openvpn_client with context %}
openvpn-client-main-config:
file.managed:
- name: {{ openvpn_client.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_client.config_dir }}/private
- user: root
- group: root
- mode: 0700
- watch_in:
- service: openvpn-client-service
openvpn-client-private-access:
file.managed:
- name: {{ openvpn_client.config_dir }}/private/pass
- source: salt://openvpn_client/pass.j2
- template: jinja
- user: root
- group: root
- mode: 0600
- watch_in:
- service: openvpn-client-service