--- - name: Install haproxy hosts: haproxy user: root roles: - role: haproxy_server tags: - haproxy-server vars: haproxy_service_configs: - 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"