|
109 | 109 | - name: Set facts based on the input
|
110 | 110 | set_fact:
|
111 | 111 | algo_server_name: >-
|
112 |
| - {% if server_name is defined %}{% set _server = server_name %} |
113 |
| - {%- elif _algo_server_name.user_input is defined and _algo_server_name.user_input | length > 0 -%} |
| 112 | + {% if server_name is defined %}{% set _server = server_name %}{%- elif _algo_server_name.user_input is defined and _algo_server_name.user_input | length > 0 -%} |
114 | 113 | {%- set _server = _algo_server_name.user_input -%}
|
115 | 114 | {%- else %}{% set _server = defaults['server_name'] %}{% endif -%}
|
116 |
| - {{ _server | regex_replace('(?!\.)(\W | _)', '-') }} |
| 115 | + {{ _server | regex_replace('(?!\.)(\W|_)', '-') }} |
117 | 116 | algo_ondemand_cellular: >-
|
118 |
| - {% if ondemand_cellular is defined %}{{ ondemand_cellular | bool }} |
119 |
| - {%- elif _ondemand_cellular.user_input is defined %}{{ booleans_map[_ondemand_cellular.user_input] | default(defaults['ondemand_cellular']) }} |
120 |
| - {%- else %}{{ false }}{% endif %} |
| 117 | + {% if ondemand_cellular is defined %}{{ ondemand_cellular | bool }}{%- elif _ondemand_cellular.user_input is defined %}{{ booleans_map[_ondemand_cellular.user_input] | default(defaults['ondemand_cellular']) }}{%- else %}{{ false }}{% endif %} |
121 | 118 | algo_ondemand_wifi: >-
|
122 |
| - {% if ondemand_wifi is defined %}{{ ondemand_wifi | bool }} |
123 |
| - {%- elif _ondemand_wifi.user_input is defined %}{{ booleans_map[_ondemand_wifi.user_input] | default(defaults['ondemand_wifi']) }} |
124 |
| - {%- else %}{{ false }}{% endif %} |
| 119 | + {% if ondemand_wifi is defined %}{{ ondemand_wifi | bool }}{%- elif _ondemand_wifi.user_input is defined %}{{ booleans_map[_ondemand_wifi.user_input] | default(defaults['ondemand_wifi']) }}{%- else %}{{ false }}{% endif %} |
125 | 120 | algo_ondemand_wifi_exclude: >-
|
126 |
| - {% if ondemand_wifi_exclude is defined %}{{ ondemand_wifi_exclude | b64encode }} |
127 |
| - {%- elif _ondemand_wifi_exclude.user_input is defined and _ondemand_wifi_exclude.user_input | length > 0 -%} |
128 |
| - {{ _ondemand_wifi_exclude.user_input | b64encode }} |
129 |
| - {%- else %}{{ '_null' | b64encode }}{% endif %} |
| 121 | + {% if ondemand_wifi_exclude is defined %}{{ ondemand_wifi_exclude | b64encode }}{%- elif _ondemand_wifi_exclude.user_input is defined and _ondemand_wifi_exclude.user_input | length > 0 -%} |
| 122 | + {{ _ondemand_wifi_exclude.user_input | b64encode }}{%- else %}{{ '_null' | b64encode }}{% endif %} |
130 | 123 | algo_dns_adblocking: >-
|
131 |
| - {% if dns_adblocking is defined %}{{ dns_adblocking | bool }} |
132 |
| - {%- elif _dns_adblocking.user_input is defined %}{{ booleans_map[_dns_adblocking.user_input] | default(defaults['dns_adblocking']) }} |
133 |
| - {%- else %}{{ false }}{% endif %} |
| 124 | + {% if dns_adblocking is defined %}{{ dns_adblocking | bool }}{%- elif _dns_adblocking.user_input is defined %}{{ booleans_map[_dns_adblocking.user_input] | default(defaults['dns_adblocking']) }}{%- else %}{{ false }}{% endif %} |
134 | 125 | algo_ssh_tunneling: >-
|
135 |
| - {% if ssh_tunneling is defined %}{{ ssh_tunneling | bool }} |
136 |
| - {%- elif _ssh_tunneling.user_input is defined %}{{ booleans_map[_ssh_tunneling.user_input] | default(defaults['ssh_tunneling']) }} |
137 |
| - {%- else %}{{ false }}{% endif %} |
| 126 | + {% if ssh_tunneling is defined %}{{ ssh_tunneling | bool }}{%- elif _ssh_tunneling.user_input is defined %}{{ booleans_map[_ssh_tunneling.user_input] | default(defaults['ssh_tunneling']) }}{%- else %}{{ false }}{% endif %} |
138 | 127 | algo_store_pki: >-
|
139 |
| - {% if ipsec_enabled %}{%- if store_pki is defined %}{{ store_pki | bool }} |
140 |
| - {%- elif _store_pki.user_input is defined %}{{ booleans_map[_store_pki.user_input] | default(defaults['store_pki']) }} |
141 |
| - {%- else %}{{ false }}{% endif %}{% endif %} |
| 128 | + {% if ipsec_enabled %}{%- if store_pki is defined %}{{ store_pki | bool }}{%- elif _store_pki.user_input is defined %}{{ booleans_map[_store_pki.user_input] | default(defaults['store_pki']) }}{%- else %}{{ false }}{% endif %}{% endif %} |
142 | 129 | rescue:
|
143 | 130 | - include_tasks: playbooks/rescue.yml
|
0 commit comments