SimpliField.haproxy
HAProxy
使用分割的配置文件设置 HAProxy
要求
- Ansible 2.x
角色变量
haproxy_frontends:
http_front:
- bind *:80
- default_backend http_back
custom_front:
- bind *:8081
- default_backend http_back
haproxy_backends:
http_back:
- balance roundrobin
- server http1 127.0.0.1:8000 check
- server http2 127.0.0.1:8001 check
依赖项
所有依赖项都在 meta/main.yml
中打包。
示例剧本
- hosts: haproxy
vars:
haproxy_frontends:
http_front:
- bind *:80
- default_backend http_back
haproxy_backends:
http_back:
- balance roundrobin
- server http1 10.0.0.1:80 check
- server http2 10.0.0.2:80 check
roles:
- role: SimpliField.haproxy
许可证
BSD