-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathzdm_proxy_immutable_config_env_vars.j2
72 lines (63 loc) · 4.29 KB
/
zdm_proxy_immutable_config_env_vars.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#jinja2: lstrip_blocks: "True", trim_blocks: "True"
{% set zdm_proxy_address_list = [] %}
{% for host in groups['proxies'] %}
{{ zdm_proxy_address_list.append(host) }}
{% endfor %}
ZDM_PROXY_TOPOLOGY_INDEX={{ groups['proxies'].index(hostvars[inventory_hostname]['ansible_default_ipv4']['address']) }}
ZDM_PROXY_TOPOLOGY_ADDRESSES={{ zdm_proxy_address_list|join(',') }}
{% if ( origin_contact_points is defined ) %}
ZDM_ORIGIN_CONTACT_POINTS={{ origin_contact_points }}
{% if ( origin_port is defined ) %}
ZDM_ORIGIN_PORT={{ origin_port }}
{% endif %}
{% elif ( ( origin_scb_downloaded is defined and origin_scb_downloaded == 'success' ) or ( origin_scb_provided is defined and origin_scb_provided == 'success' ) )%}
ZDM_ORIGIN_SECURE_CONNECT_BUNDLE_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/origin_scb.zip
{% endif %}
{% if ( origin_local_datacenter is defined ) %}
ZDM_ORIGIN_LOCAL_DATACENTER={{ origin_local_datacenter }}
{% endif %}
{% if ( target_contact_points is defined ) %}
ZDM_TARGET_CONTACT_POINTS={{ target_contact_points }}
{% if ( target_port is defined ) %}
ZDM_TARGET_PORT={{ target_port }}
{% endif %}
{% elif ( target_scb_downloaded is defined and target_scb_downloaded == 'success' ) or ( target_scb_provided is defined and target_scb_provided == 'success' ) %}
ZDM_TARGET_SECURE_CONNECT_BUNDLE_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/target_scb.zip
{% endif %}
{% if ( target_local_datacenter is defined ) %}
ZDM_TARGET_LOCAL_DATACENTER={{ target_local_datacenter }}
{% endif %}
ZDM_PROXY_LISTEN_ADDRESS={{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}
ZDM_PROXY_LISTEN_PORT={{ zdm_proxy_listen_port }}
ZDM_METRICS_ADDRESS={{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}
ZDM_METRICS_PORT={{ metrics_port }}
{% if ( origin_tls_user_dir_path is defined and origin_tls_server_ca_filename is defined ) %}
ZDM_ORIGIN_TLS_SERVER_CA_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ origin_tls_dest_dir_name }}/{{ origin_tls_server_ca_filename }}
{% endif %}
{% if ( origin_tls_user_dir_path is defined and origin_tls_client_cert_filename is defined ) %}
ZDM_ORIGIN_TLS_CLIENT_CERT_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ origin_tls_dest_dir_name }}/{{ origin_tls_client_cert_filename }}
{% endif %}
{% if ( origin_tls_user_dir_path is defined and origin_tls_client_key_filename is defined ) %}
ZDM_ORIGIN_TLS_CLIENT_KEY_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ origin_tls_dest_dir_name }}/{{ origin_tls_client_key_filename }}
{% endif %}
{% if ( target_tls_user_dir_path is defined and target_tls_server_ca_filename is defined ) %}
ZDM_TARGET_TLS_SERVER_CA_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ target_tls_dest_dir_name }}/{{ target_tls_server_ca_filename }}
{% endif %}
{% if ( target_tls_user_dir_path is defined and target_tls_client_cert_filename is defined ) %}
ZDM_TARGET_TLS_CLIENT_CERT_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ target_tls_dest_dir_name }}/{{ target_tls_client_cert_filename }}
{% endif %}
{% if ( target_tls_user_dir_path is defined and target_tls_client_key_filename is defined ) %}
ZDM_TARGET_TLS_CLIENT_KEY_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ target_tls_dest_dir_name }}/{{ target_tls_client_key_filename }}
{% endif %}
{% if ( zdm_proxy_tls_user_dir_path is defined and zdm_proxy_tls_ca_filename is defined ) %}
ZDM_PROXY_TLS_CA_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ zdm_proxy_tls_dest_dir_name }}/{{ zdm_proxy_tls_ca_filename }}
{% endif %}
{% if ( zdm_proxy_tls_user_dir_path is defined and zdm_proxy_tls_cert_filename is defined ) %}
ZDM_PROXY_TLS_CERT_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ zdm_proxy_tls_dest_dir_name }}/{{ zdm_proxy_tls_cert_filename }}
{% endif %}
{% if ( zdm_proxy_tls_user_dir_path is defined and zdm_proxy_tls_key_filename is defined ) %}
ZDM_PROXY_TLS_KEY_PATH={{ zdm_proxy_home_dir }}/{{ zdm_proxy_shared_assets_dir_name }}/{{ zdm_proxy_tls_dest_dir_name }}/{{ zdm_proxy_tls_key_filename }}
{% endif %}
{% if ( zdm_proxy_tls_require_client_auth is defined ) %}
ZDM_PROXY_TLS_REQUIRE_CLIENT_AUTH={{ zdm_proxy_tls_require_client_auth }}
{% endif %}