tor-formula/tor/files/ini.jinja

36 lines
819 B
Plaintext
Raw Permalink Normal View History

2019-03-27 14:50:46 +01:00
{%- set exclude = [] -%}
{%- macro set_config(config, spacer=' ') -%}
{% for parameter in config | sort -%}
{% if parameter not in exclude -%}
{% set value = config.get(parameter) -%}
{% if value is mapping -%}
{{ set_config(value) }}
{%- elif value is sequence and value is not string -%}
{% for item in value -%}
{{ parameter }}{{ spacer }}{{ item }}
{% endfor -%}
{%- elif value is not none -%}
{{ parameter }}{{ spacer }}{{ value }}
{% endif -%}
{% endif -%}
{% endfor -%}
{% endmacro -%}
#
# **** DO NOT EDIT THIS FILE ****
#
# This file is managed by Salt
#
{% if config -%}
{{ set_config(config) }}
{% endif -%}
{%- if hsmap | length %}
{%- for hs, config in hsmap.items() %}
HiddenServiceDir {{ hsdir }}/{{ hs }}
HiddenServicePort {{ config['virtport'] }} {{ config['target'] }}
{%- endfor %}
{%- endif %}