Marc Gariepy a2c1d8ca2c Fix configuration string for haproxy
Use user and group configuration option, uid and gid need a number
instead of a name. Specifying a name for uid/gid attributes will make
haproxy run under the root user.

Change-Id: I1d6db661b7d0958e1ba888770e3ce789d7cb4a76
2016-04-11 10:13:04 -04:00
..
2016-02-09 16:46:22 +01:00

OpenStack Haproxy Server

tags

openstack, galera, haproxy, cloud, ansible

category

*nix

Role for the installation and setup of haproxy

- name: Install haproxy
  hosts: haproxy
  user: root
  roles:
    - { role: "haproxy_server", tags: [ "haproxy-server" ] }
  vars:
    haproxy_service_configs:
      - service:
          hap_service_name: group_name
          hap_backend_nodes: "{{ groups['group_name'][0] }}"
          hap_backup_nodes: "{{ groups['group_name'][1:] }}"
          hap_port: 80
          hap_balance_type: http
          hap_backend_options:
            - "forwardfor"
            - "httpchk"
            - "httplog"