salt/wireguard: replace /etc path

This commit is contained in:
Astro 2018-05-17 15:29:49 +02:00
parent 2092b2ae26
commit 2a59f2cab2
1 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ wireguard-tools:
- source: salt://wireguard/wireguard.service - source: salt://wireguard/wireguard.service
{%- for instance, conf in pillar['wireguard-instances'].items() %} {%- for instance, conf in pillar['wireguard-instances'].items() %}
/etc/wg/{{ instance }}.conf: /etc/wireguard/{{ instance }}.conf:
file.managed: file.managed:
- source: salt://wireguard/wireguard.conf - source: salt://wireguard/wireguard.conf
- template: 'jinja' - template: 'jinja'
@ -17,7 +17,7 @@ autostart-wg-{{ instance }}:
service.enabled: service.enabled:
- name: wireguard@{{ instance }} - name: wireguard@{{ instance }}
require: require:
- file: /etc/wg/{{ instance }}.conf - file: /etc/wireguard/{{ instance }}.conf
start-wg-{{ instance }}: start-wg-{{ instance }}:
service.running: service.running:
@ -25,5 +25,5 @@ start-wg-{{ instance }}:
require: require:
- service: autostart-wg-{{ instance }} - service: autostart-wg-{{ instance }}
watch: watch:
- file: /etc/wg/{{ instance }}.conf - file: /etc/wireguard/{{ instance }}.conf
{%- endfor %} {%- endfor %}