HAProxy supervision

This commit is contained in:
VC
2020-01-01 10:07:39 +01:00
parent fddbc1c9b4
commit 4f2bd402d4
2 changed files with 32 additions and 5 deletions

View File

@@ -69,19 +69,20 @@ frontend https
## {{ server }} configuration
backend http_{{ server }}
mode http
server host_{{ server }} {{ server }}:80
server host_{{ server.split('.')|join('_') }} {{ server }}:80
backend https_{{ server }}
mode tcp
server host_{{ server }} {{ server }}:443
server host_{{ server.split('.')|join('_') }} {{ server }}:443
{% endfor %}
## Stats
listen stats
bind *:8080
bind localhost:80
mode http
log global
stats enable
stats uri /
stats show-legends
stats uri /haproxy-status
stats hide-version

View File

@@ -26,13 +26,39 @@
- restart munin-node
when: munin_need_reconfigure
## Adding modules for specific functions
- name: install LWP::UserAgent
package:
name: libwww-perl
state: present
notify:
- restart munin-node
when: "'webservers' in group_names"
when: "'webservers' in group_names or 'loadbalancers' in group_names"
- name: add HAProxy backend module
file:
src: /usr/share/munin/plugins/haproxy_
dest: /etc/munin/plugins/haproxy_current
state: link
notify:
- restart munin-node
when: "'loadbalancers' in group_names"
- name: install Cache::Cache
package:
name: libcache-cache-perl
state: present
notify:
- restart munin-node
when: "'mariadbservers' in group_names"
- name: install DBD::Pg
package:
name: libdbd-pg-perl
state: present
notify:
- restart munin-node
when: "'pgsqlservers' in group_names"
- name: reconfigure munin-node
shell: