Support more haproxy configuration scenarios.
This commit is contained in:
parent
191d831fd4
commit
3d717c1262
|
@ -1,10 +1,9 @@
|
||||||
---
|
---
|
||||||
docker_swarm_cluster_haproxy_install: True
|
docker_swarm_cluster_haproxy_install: True
|
||||||
# mesh, keepalive, global
|
# mesh, keepalive, global
|
||||||
docker_swarm_haproxy_installation_type: 'keepalive'
|
docker_swarm_haproxy_installation_type: 'global'
|
||||||
docker_swarm_haproxy_networks:
|
# I did not find any way to make it dependant on docker_swarm_haproxy_installation_type
|
||||||
- 'portainer_{{ docker_swarm_portainer_network }}'
|
docker_swarm_haproxy_keepalive_installation: False
|
||||||
docker_swarm_haproxy_additional_networks: []
|
|
||||||
#
|
#
|
||||||
docker_swarm_expose_api_via_haproxy: True
|
docker_swarm_expose_api_via_haproxy: True
|
||||||
docker_swarm_expose_api_hostname: 'swarm.example.com'
|
docker_swarm_expose_api_hostname: 'swarm.example.com'
|
||||||
|
@ -20,10 +19,6 @@ docker_swarm_portainer_network: 'agent_network'
|
||||||
docker_swarm_portainer_http_port: '9000'
|
docker_swarm_portainer_http_port: '9000'
|
||||||
docker_swarm_portainer_service_port: '8000'
|
docker_swarm_portainer_service_port: '8000'
|
||||||
|
|
||||||
# The allowed_networks parameter is optional
|
|
||||||
docker_swarm_haproxy_additional_services: []
|
|
||||||
# - { acl_name: 'service', acl_rule: 'hdr_dom(host) -i service.example.com', service_name: 'service-', service_replica_num: '1', service_port: '9999', service_overlay_network: 'service-network', allowed_networks: '192.168.1.0/24 192.168.2.0/24' }
|
|
||||||
|
|
||||||
docker_swarm_keepalived_vrouter_id: 205
|
docker_swarm_keepalived_vrouter_id: 205
|
||||||
docker_swarm_keepalived_floating_ip: '127.0.0.1/8'
|
docker_swarm_keepalived_floating_ip: '127.0.0.1/8'
|
||||||
docker_swarm_keepalived_instance_name: 'VI_HAPROXY_1'
|
docker_swarm_keepalived_instance_name: 'VI_HAPROXY_1'
|
||||||
|
|
|
@ -1,16 +1,23 @@
|
||||||
---
|
---
|
||||||
haproxy_docker_container: True
|
haproxy_docker_container: True
|
||||||
haproxy_ha_with_keepalived: True
|
haproxy_ha_with_keepalived: '{{ docker_swarm_haproxy_keepalive_installation }}'
|
||||||
|
keepalived_install: '{{ docker_swarm_haproxy_keepalive_installation }}'
|
||||||
keepalived_install: True
|
|
||||||
keepalived_vrouter_id: '{{ docker_swarm_keepalived_vrouter_id }}'
|
keepalived_vrouter_id: '{{ docker_swarm_keepalived_vrouter_id }}'
|
||||||
keepalived_use_unicast: True
|
keepalived_use_unicast: False
|
||||||
keepalived_floating_ip1: '{{ docker_swarm_keepalived_floating_ip }}'
|
keepalived_floating_ip1: '{{ docker_swarm_keepalived_floating_ip }}'
|
||||||
keepalived_instance1_name: '{{ docker_swarm_keepalived_instance_name }}'
|
keepalived_instance1_name: '{{ docker_swarm_keepalived_instance_name }}'
|
||||||
keepalived_nagios_check: False
|
keepalived_nagios_check: False
|
||||||
keepalived_service_to_check: 'haproxy'
|
keepalived_service_to_check: 'haproxy'
|
||||||
keepalived_script1_check: "/usr/bin/docker container ls --filter name=haproxy | /bin/grep haproxy"
|
keepalived_script1_check: "/usr/bin/docker container ls --filter name=haproxy | /bin/grep haproxy"
|
||||||
|
|
||||||
|
docker_swarm_haproxy_constraints: '{{ haproxy_docker_swarm_haproxy_constraints }}'
|
||||||
|
# The allowed_networks parameter is optional
|
||||||
|
docker_swarm_haproxy_additional_services: '{{ haproxy_docker_swarm_additional_services }}'
|
||||||
|
|
||||||
|
docker_swarm_haproxy_networks: '{{ haproxy_docker_swarm_networks }}'
|
||||||
|
|
||||||
|
docker_swarm_haproxy_additional_networks: '{{ haproxy_docker_swarm_additional_networks }}'
|
||||||
|
|
||||||
keepalived_scripts:
|
keepalived_scripts:
|
||||||
- name: '{{ keepalived_script1_name }}'
|
- name: '{{ keepalived_script1_name }}'
|
||||||
script: '{{ keepalived_check_script }}'
|
script: '{{ keepalived_check_script }}'
|
||||||
|
|
Loading…
Reference in New Issue