Skip to content

Commit

Permalink
Merge pull request #10 from stone-payments/fix/readeable_template
Browse files Browse the repository at this point in the history
Cosmetic change to render the squid.conf template nicer to read
  • Loading branch information
iblackman authored Aug 20, 2018
2 parents 36cd9c8 + 0e41e8c commit 1d24131
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions templates/squid.conf.j2
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
{% for localnet in squid_localnets %}
acl localnet src {{ localnet }}
{% for localnet in squid_localnets -%}
acl localnet src {{ localnet }}
{% endfor %}

{% if squid_custom_localnets is defined %}
{% if squid_custom_localnets is defined -%}
{% for localnet in squid_custom_localnets %}
acl localnet src {{ localnet }}
acl localnet src {{ localnet }}
{% endfor %}
{% endif %}

{% for sslports in squid_sslports %}
acl SSL_ports port {{ sslports }}
{% for sslports in squid_sslports -%}
acl SSL_ports port {{ sslports }}
{% endfor %}

{% if squid_custom_sslports is defined %}
{% if squid_custom_sslports is defined -%}
{% for sslports in squid_custom_sslports %}
acl SSL_ports port {{ sslports }}
acl SSL_ports port {{ sslports }}
{% endfor %}
{% endif %}

{% for safeports in squid_safeports %}
acl Safe_ports port {{ safeports }}
{% for safeports in squid_safeports -%}
acl Safe_ports port {{ safeports }}
{% endfor %}

{% if squid_custom_safeports is defined %}
{% for safeports in squid_custom_safeports %}
acl Safe_ports port {{ safeports }}
{% if squid_custom_safeports is defined -%}
{% for safeports in squid_custom_safeports -%}
acl Safe_ports port {{ safeports }}
{% endfor %}
{% endif %}

{% for acl in squid_acls %}
acl {{ acl.name }} {{ acl.type }} {{ acl.arg }}
{% for acl in squid_acls -%}
acl {{ acl.name }} {{ acl.type }} {{ acl.arg }}
{% endfor %}

{% if squid_custom_acls is defined %}
{% for acl in squid_custom_acls %}
acl {{ acl.name }} {{ acl.type }} {{ acl.arg }}
{% if squid_custom_acls is defined -%}
{% for acl in squid_custom_acls -%}
acl {{ acl.name }} {{ acl.type }} {{ acl.arg }}
{% endfor %}
{% endif %}

{% if squid_custom_configs is defined %}
{% for config in squid_custom_configs %}
{{ config }}
{% if squid_custom_configs is defined -%}
{% for config in squid_custom_configs -%}
{{ config }}
{% endfor %}
{% endif %}

{% if squid_custom_http_access is defined %}
{% for http_access in squid_custom_http_access %}
http_access {{ http_access.perm }} {{ http_access.aclname }}
{% if squid_custom_http_access is defined -%}
{% for http_access in squid_custom_http_access -%}
http_access {{ http_access.perm }} {{ http_access.aclname }}
{% endfor %}
{% endif %}

{% for http_access in squid_http_access %}
http_access {{ http_access.perm }} {{ http_access.aclname }}
{% for http_access in squid_http_access -%}
http_access {{ http_access.perm }} {{ http_access.aclname }}
{% endfor %}

http_port {{ squid_port }}

{% if squid_diskcache %}
cache_dir {{ squid_diskcache }}
{% if squid_diskcache -%}
cache_dir {{ squid_diskcache }}
{% endif %}

coredump_dir /dev/null

{% for rp in squid_refresh_pattern %}
refresh_pattern {{ rp.case_sensitive }} {{ rp.regex }} {{ rp.min }} {{ rp.percent }} {{ rp.max }} {{ rp.opts }}
{% for rp in squid_refresh_pattern -%}
refresh_pattern {{ rp.case_sensitive }} {{ rp.regex }} {{ rp.min }} {{ rp.percent }} {{ rp.max }} {{ rp.opts }}
{% endfor %}

{% if squid_custom_refresh_pattern is defined %}
{% for rp in squid_custom_refresh_pattern %}
refresh_pattern {{ rp.case_sensitive }} {{ rp.regex }} {{ rp.min }} {{ rp.percent }} {{ rp.max }} {{ rp.opts }}
{% if squid_custom_refresh_pattern is defined -%}
{% for rp in squid_custom_refresh_pattern -%}
refresh_pattern {{ rp.case_sensitive }} {{ rp.regex }} {{ rp.min }} {{ rp.percent }} {{ rp.max }} {{ rp.opts }}
{% endfor %}
{% endif %}

{% if squid_outgoing_adress %}
tcp_outgoing_address {{ squid_outgoing_adress }}
{% if squid_outgoing_adress -%}
tcp_outgoing_address {{ squid_outgoing_adress }}
{% endif %}

{% if squid_visible_hostname %}
visible_hostname {{ squid_visible_hostname }}
{% if squid_visible_hostname -%}
visible_hostname {{ squid_visible_hostname }}
{% endif %}

0 comments on commit 1d24131

Please sign in to comment.