38e4a9e586
The yaml should start with "---" Change-Id: I82b195b77102c3da98ca42cdba800b52bab10631
21 lines
610 B
YAML
21 lines
610 B
YAML
---
|
|
- name: Install haproxy
|
|
hosts: haproxy
|
|
user: root
|
|
roles:
|
|
- { role: "haproxy_server", tags: [ "haproxy-server" ] }
|
|
vars:
|
|
haproxy_service_configs:
|
|
- service:
|
|
haproxy_service_name: group_name
|
|
haproxy_backend_nodes: "{{ groups['group_name'][0] }}"
|
|
haproxy_backup_nodes: "{{ groups['group_name'][1:] }}"
|
|
haproxy_port: 80
|
|
haproxy_balance_type: http
|
|
haproxy_backend_options:
|
|
- "forwardfor"
|
|
- "httpchk"
|
|
- "httplog"
|
|
haproxy_backend_arguments:
|
|
- 'http-check expect string OK'
|