Skip to content
Snippets Groups Projects
Commit 44068f8d authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/arocom#108 Allow support for external hosts in HaProxy

parent cc3e4ed8
No related branches found
No related tags found
No related merge requests found
#HaProxy#
##Instruction to prepare a certificate file##
# Instruction to prepare a certificate file
For HaProxy to terminate SSL requests we require a single PEM file with all certificate components chained together.
......
......@@ -33,7 +33,7 @@
mode=644
state=touch
with_items: '{{ groups.all }}'
notify: 'Proxy | Restart HAProxy'
changed_when: false
- name: "Proxy | Create config file"
template: src=haproxy_cfg
......
......@@ -110,6 +110,10 @@ frontend https_in_{{ cert.ip }}
acl kibana_present hdr(host) -i -n '{{ kibana_domain|default(inventory_hostname) }}'
use_backend backend_kibana if kibana_present
{% endif %}
{% for external in cert.external|default([]) %}
acl is_{{ external.key }} {{ external.acl }}
use_backend backend_{{ external.key }} if is_{{ external.key }}
{% endfor %}
{% if varnish_host|default(false) %}
acl static_content path_end .jpg .jpeg .gif .png .ico .swf .css .js .htm .html
use_backend backend_varnish if static_content
......@@ -124,6 +128,11 @@ frontend https_in_{{ cert.ip }}
use_backend backend_redirect if crm_redirect_{{host}}
{% endif %}
{% endfor %}
{% for external in cert.external|default([]) %}
backend backend_{{ external.key }}
server server_{{ external.key }} {{ external.server }} maxconn 100
{% endfor %}
{% endfor %}
{% for host in groups['all'] %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment