diff --git a/README.md b/README.md index 50cca6f..d9c9819 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ # ansible-role-haproxy -Ansible role to install and configure HAProxy load balancer \ No newline at end of file +Ansible role to install and configure HAProxy load balancer + +## Installation + +In your Ansible repo's `requirements.txt` file, you can include it as detailed below and install it via `ansible-galaxy`. + +```yaml +roles: + - src: ascendings.haproxy + version: 0.1.0 # change this as needed +``` + +## vars + +This section lists the available vars to configure this role. + +`haproxy_backend_servers` - A hash of servers to use in the backend; example: + +```yaml +haproxy_backend_servers: + - name: web01 + address: 192.168.1.10 + port: 80 # optional; default is 80 + - name: web02 + address: 192.168.1.11 + port: 80 +``` + +`haproxy_backend_balance` - Defines the backend load-balancing method; refer to [the HAProxy docs]() for valid options.