paulbsd-salt/states/openvpn_client/config.sls

33 lines
839 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
2020-07-10 00:58:55 +02:00
- 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:
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
2020-07-10 00:58:55 +02:00
- source: salt://openvpn_client/pass.j2
- template: jinja
- user: root
- group: root
- mode: 0600
- watch_in:
2020-07-10 01:56:49 +02:00
- service: openvpn-client-service