devops-coop / ansible-haproxy

Installs and configure HAProxy
Apache License 2.0
96 stars 97 forks source link

Allow user to override HAProxy package name #81

Open benwebber opened 7 years ago

benwebber commented 7 years ago

IUS offers HAProxy 1.6 and 1.7 as haproxy16u and haproxy17u, respectively.

include_vars could do something like:

- include_vars:
    # returns {"_haproxy_package_name": "haproxy"}
    - "{{ ansible_distribution }}.yml"

Then we can install HAProxy like so:

- package:
    name: "{{ haproxy_package_name | default(_haproxy_package_name) }}"