Skip to main content

HAProxy Role

This Ansible role can be used to set up HAProxy.


Variables

VariablesTypeOptionsDefaults
haproxy_service_name:string---haproxy.service
haproxy_service_state:stringstarted, stoppedstarted
haproxy_service_enabled:boolfalse, truetrue
haproxy_package_state:stringpresent, absent, latestpresent
haproxy_package:list---haproxy
haproxy_config_path:string---/etc/haproxy/haproxy.cfg
haproxy_config_ssl:boolfalse, truetrue
haproxy_config_force_https:boolfalse, truetrue
haproxy_config_maxconn:int---2000
haproxy_selinux_permissive:boolfalse, truetrue
haproxy_config_http_apps:dict------
haproxy_config_http_apps.name:string---example-app1
haproxy_config_http_apps.domain:string---example.com
haproxy_config_http_apps.force_https:boolfalse, truetrue
haproxy_config_http_apps.certificate:string---/etc/ssl/example-app1.pem
haproxy_config_http_apps.servers:dict------
haproxy_config_http_apps.servers.name:string---example_server1
haproxy_config_http_apps.servers.host:string---192.168.1.101
haproxy_config_http_apps.servers.port:int---8080
haproxy_config_tcp_apps:dict------
haproxy_config_tcp_apps.name:string---example-tcp-app1
haproxy_config_tcp_apps.port:int---3306
haproxy_config_tcp_apps.servers:dict------
haproxy_config_tcp_apps.servers.name:string---example_server1
haproxy_config_tcp_apps.servers.host:string---192.168.1.101
haproxy_config_tcp_apps.servers.port:int---3306

Example Playbook

- name: Import haproxy Role
hosts: all
roles:
- role: giftpilz0.server.haproxy