devops-coop / ansible-haproxy

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

Users cannot specify error files on Alpine or CentOS #82

Open benwebber opened 7 years ago

benwebber commented 7 years ago

CentOS and Alpine don't ship error files (or don't place them in the locations found in defaults.yml). In the defaults.cfg template, we do not configure errorfile directives on these distributions:

https://github.com/devops-coop/ansible-haproxy/blob/0dac057616e9758c51b2f88d1bc9754b3f1e3caa/templates/defaults.cfg#L52-L58

This prevents users on those distributions from declaring error files using this role.

We need to allow the user to specify that they want to configure the files if they've provided them outside this role.

roedie commented 7 years ago

I have been looking at this but the only thing I have come up with is a separate default/main.yml for distributions with or without errorfiles.

couchgott commented 7 years ago

Hi Guys,

just in case. RHEL also does not ship errorfiles so for using your role i had to extend with:

... and ansible_distribution != 'RedHat' .... CentOS and RHEL put their errorfiles here:

/usr/share/haproxy/

by default.

Cheers!