ansible-role-strongswan/templates/ipsec.conf.j2

25 lines
663 B
Text
Raw Normal View History

2021-09-11 16:52:14 +00:00
# {{ ansible_managed }}
config setup
charondebug=all
conn %default
{% for default_option, default_value in strongswan_default_config.items() %}
{{ default_option }}={% if default_value is sameas true %}yes
{% elif default_value is sameas false %}no
{% else %}{{ default_value }}
{% endif %}
{% endfor %}
{% for conn_name, conn_options in strongswan_connections.items() %}
conn {{ conn_name }}
{% for conn_option, conn_value in conn_options.items() %}
{% if conn_option != 'psk' %}
{{ conn_option }}={% if conn_value is sameas true %}yes
{% elif conn_value is sameas false %}no
{% else %}{{ conn_value }}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}