Add support for compiling the source code #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This PR will add support for compiling the source code of HAProxy, install a specific minor version, install the systemd file instead of the init.d (in case systemd is installed), create the global haproxy user and global haproxy group.
Why?
I've decided to start from something already working and build a role which compiles a specific haproxy version for different Linux distro (with Lua support also).
The 'latest' version is not always what we would like to install. A scenario would be a deployment of a cluster of HAProxy in different phases, and in between these phases, a new minor version of HAProxy is released. By specifying the minor version, the cluster would have the same software installed.
Another reason for this PR is a scenario where you want to install/configure/manage haproxy in the same infrastructure but in different Linux distribution, e.g. as a sidecar proxy.
How?
The main idea is to change just what is needed to compile and install haproxy.
The PPA support has been kept as it is, but the variable haproxy_use_ppa has been changed to false by default.
The install.yml has been renamed to install_ppa.yml, and a new intsall_src.yml has been added.
In the tasks folder, the file main.yml has been changed in order to load the install_ppa.yml where the variable haproxy_use_ppa is true or load the install_ppa.yml when the haproxy_use_ppa is false.
Testing?
In the tests, other Vagrant boxes have been added, but Ubuntu 12 has been dropped since the PCRE JIT is not well supported.
In the vagrant file Debian, CentOS and AMI Linux have been added.
Anything Else?
This role is the best role that I've seen so far.