OPTIONS=--loglevel={{ openshift.master.debug_level | default(2) }}
CONFIG_FILE={{ openshift_master_config_file }}
{% if openshift.common.is_containerized | bool %}
IMAGE_VERSION={{ openshift_image_tag }}
{% endif %}

{% if openshift_cloudprovider_kind | default('') == 'aws' and openshift_cloudprovider_aws_access_key is defined and openshift_cloudprovider_aws_secret_key is defined %}
AWS_ACCESS_KEY_ID={{ openshift_cloudprovider_aws_access_key }}
AWS_SECRET_ACCESS_KEY={{ openshift_cloudprovider_aws_secret_key }}
{% endif %}

{% if 'api_env_vars' in openshift.master or 'controllers_env_vars' in openshift.master -%}
{% for key, value in openshift.master.api_env_vars.items() | default([]) | union(openshift.master.controllers_env_vars.items() | default([])) -%}
{{ key }}={{ value }}
{% endfor -%}
{% endif -%}

# Proxy configuration
# See https://docs.openshift.com/container-platform/3.3/install_config/install/advanced_install.html#advanced-install-configuring-global-proxy
{% if 'http_proxy' in openshift.common %}
HTTP_PROXY={{ openshift.common.http_proxy | default('') }}
{% endif %}
{% if 'https_proxy' in openshift.common %}
HTTPS_PROXY={{ openshift.common.https_proxy | default('')}}
{% endif %}
{% if 'no_proxy' in openshift.common %}
NO_PROXY={{ openshift.common.no_proxy | default('') | join(',') }},{{ openshift.common.portal_net }},{{ openshift.master.sdn_cluster_network_cidr }}
{% endif %}
