Added peer configuration and error reponses
This commit is contained in:
parent
b11647f184
commit
170a4bab7d
|
@ -1,6 +1,8 @@
|
|||
secret "{{ profile.value.private_key }}";
|
||||
# ansible managed
|
||||
|
||||
secret "{{ profile.value.private_key |mandatory('A profile required a private_key') }}";
|
||||
log level {{ profile.value.log_level |d("info") }};
|
||||
interface "{{ profile.value.interface |d('fastd-%s' |format(profile.key)) }}";
|
||||
interface "{{ profile.value.interface |d('fastd_%s' |format(profile.key)) }}";
|
||||
mode {{ profile.value.mode |d("tap") }};
|
||||
mtu {{ profile.value.mtu |d("1280") }};
|
||||
|
||||
|
@ -8,12 +10,13 @@ mtu {{ profile.value.mtu |d("1280") }};
|
|||
method "{{ method }}";
|
||||
{% endfor %}
|
||||
|
||||
bind {{ profile.value.bind |d('any:10061') }};
|
||||
|
||||
{% if not (profile.value.verify |d(True)) %}
|
||||
on verify "true";
|
||||
{% if profile.value.bind |d(False) %}
|
||||
bind {{ profile.value.bind }};
|
||||
{% endif %}
|
||||
|
||||
include peers from "peers";
|
||||
include peers from "{{ config_dir }}/{{ profile.key }}/peers";
|
||||
|
||||
{% if profile.value.additional_config |d(False) %}
|
||||
{{ profile.value.additional_config }}
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
key "{{ peer.value.public_key }}";
|
||||
# ansible managed
|
||||
|
||||
key "{{ peer.value.public_key |mandatory('A public key is required for a peer') }}";
|
||||
|
||||
{% for remote in peer.value.remotes |d([]) %}
|
||||
remote {{ remote }};
|
||||
|
|
Loading…
Reference in New Issue