emmetog.haproxy

Ansible Role: HAProxy

Build Status

This role installs HAProxy on RedHat/CentOS and Debian/Ubuntu Linux servers.

Note: This role supports HAProxy versions 1.4 and 1.5. Newer versions may need some adjustments.

Note: This role is based on geerlingguy/ansible-role-haproxy with some changes to make it more flexible.

Requirements

No requirements.

Role Variables

Here are the available variables and their default values (check defaults/main.yml for details):

  • haproxy_sockets:

    • Example: "/var/lib/haproxy/stats level admin"
    • These are the sockets HAProxy uses for communication (for administrative tasks or statistics). To disable this, set haproxy_sockets: [] (an empty list).
  • haproxy_chroot:

    • Example: /var/lib/haproxy
    • The directory where chroot() will occur before reducing privileges. To disable this, set haproxy_chroot: '' (an empty string). Change this only if you know what you're doing!
  • haproxy_user:

    • Default: haproxy
    • The user that will run HAProxy. Change this only if you know what you're doing!
  • haproxy_group:

    • Default: haproxy
    • The group that will run HAProxy. Change this only if you know what you're doing!
  • haproxy_log_destination:

    • Default: /dev/log
    • The default log destination, which you usually won’t need to change.
  • haproxy_backend_timeout:

    • Default: 50000
    • The timeout (in milliseconds) for backend servers to respond. It's suggested that this value matches the client timeout.
  • haproxy_defaults:

    • Example: []
    • Any settings to add to the "defaults" section.
  • haproxy_frontend_servers:

    • Example: []
    • HAProxy frontend configuration commands.
  • haproxy_backend_servers:

    • Example: []
    • HAProxy backend configuration commands.
  • haproxy_global_vars:

    • Example:
      • 'ssl-default-bind-ciphers ABCD+KLMJ:...'
      • 'ssl-default-bind-options no-sslv3'
    • A list of additional global variables for the HAProxy configuration file.
  • haproxy_restarted_status:

    • Default: restarted
    • The status of the HAProxy service after configuration changes.

Dependencies

No dependencies.

Example Playbook

- hosts: balancer
  sudo: yes
  roles:
    - { role: geerlingguy.haproxy }

License

MIT / BSD

Author Information

This role was originally created in 2015 by Jeff Geerling, who wrote Ansible for DevOps. This version is maintained by Emmet O'Grady.

Informazioni sul progetto

HAProxy installation and configuration.

Installa
ansible-galaxy install emmetog.haproxy
Licenza
mit
Download
109
Proprietario