Simplify Apple Profile Configuration Template

This commit is contained in:
Fabian Foerg 2018-12-12 22:07:29 -08:00
parent 58ce62e2bd
commit c70dd01bb2

View file

@ -7,13 +7,13 @@
<dict>
<key>IKEv2</key>
<dict>
{% if algo_ondemand_wifi or algo_ondemand_cellular %}
{%- if algo_ondemand_wifi or algo_ondemand_cellular %}
<key>OnDemandEnabled</key>
<integer>1</integer>
<key>OnDemandRules</key>
<array>
{% if algo_ondemand_wifi_exclude|b64decode != '_null' %}
{% set WIFI_EXCLUDE_LIST = (algo_ondemand_wifi_exclude|b64decode|string).split(',') %}
{%- if algo_ondemand_wifi_exclude|b64decode != '_null' %}
{%- set WIFI_EXCLUDE_LIST = (algo_ondemand_wifi_exclude|b64decode|string).split(',') %}
<dict>
<key>Action</key>
<string>Disconnect</string>
@ -21,20 +21,19 @@
<string>WiFi</string>
<key>SSIDMatch</key>
<array>
{% for network_name in WIFI_EXCLUDE_LIST %}
{%- for network_name in WIFI_EXCLUDE_LIST %}
<string>{{ network_name|e }}</string>
{% endfor %}
{%- endfor %}
</array>
</dict>
{% else %}
{% endif %}
{%- endif %}
<dict>
<key>Action</key>
{% if algo_ondemand_wifi %}
{%- if algo_ondemand_wifi %}
<string>Connect</string>
{% else %}
{%- else %}
<string>Disconnect</string>
{% endif %}
{%- endif %}
<key>InterfaceTypeMatch</key>
<string>WiFi</string>
<key>URLStringProbe</key>
@ -42,11 +41,11 @@
</dict>
<dict>
<key>Action</key>
{% if algo_ondemand_cellular %}
{%- if algo_ondemand_cellular %}
<string>Connect</string>
{% else %}
{%- else %}
<string>Disconnect</string>
{% endif %}
{%- endif %}
<key>InterfaceTypeMatch</key>
<string>Cellular</string>
<key>URLStringProbe</key>
@ -57,8 +56,7 @@
<string>Disconnect</string>
</dict>
</array>
{% else %}
{% endif %}
{%- endif %}
<key>AuthenticationMethod</key>
<string>Certificate</string>
<key>ChildSecurityAssociationParameters</key>