Install haproxyctl and haproxy-log-analysis when requested.

This commit is contained in:
Andrea Dell'Amico 2020-08-05 19:33:53 +02:00
parent e724cea628
commit 7ac7a50225
2 changed files with 13 additions and 4 deletions

View File

@ -17,6 +17,11 @@ haproxy_admin_socket: /run/haproxy/admin.sock
haproxy_letsencrypt_managed: True
haproxy_cert_dir: '{{ pki_dir }}/haproxy'
haproxy_install_additional_pkgs: False
haproxy_additional_pkgs:
- haproxyctl
- haproxy-log-analysis
haproxy_nagios_check: False
# It's a percentage
haproxy_nagios_check_w: 70

View File

@ -8,14 +8,14 @@
apt_repository: repo='{{ haproxy_ubuntu_latest_repo }}' state=present update_cache=yes
when:
- haproxy_latest_release
- is_ubuntu
- ansible_distribution == "Ubuntu"
tags: haproxy
- name: Define the haproxy repository
apt_repository: repo='{{ haproxy_debian_latest_repo }}' state=present update_cache=yes
when:
- haproxy_latest_release
- is_debian
- ansible_distribution == "Debian"
tags: haproxy
- name: Install the haproxy package
@ -28,7 +28,7 @@
apt: name=haproxy state=latest default_release={{ ansible_lsb.codename }}-backports-{{ haproxy_version }} update_cache=yes cache_valid_time=3600
when:
- haproxy_latest_release
- is_debian
- ansible_distribution == "Debian"
register: install_haproxy
tags: haproxy
@ -36,10 +36,14 @@
apt: name=haproxy state=latest update_cache=yes cache_valid_time=3600
when:
- haproxy_latest_release
- is_ubuntu
- ansible_distribution == "Ubuntu"
register: install_haproxy
tags: haproxy
- name: Install some additional packages
apt: name={{ haproxy_additional_pkgs }} state=latest update_cache=yes cache_valid_time=3600
when: haproxy_install_additional_pkgs
- name: Enable kernel binding non local IP addresses
sysctl: name={{ item }} value=1 reload=yes state=present
with_items: