ansible-role-strongswan/templates/ipsec.conf.j2
2021-09-11 18:52:14 +02:00

24 lines
663 B
Django/Jinja

# {{ 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 %}