Maj lb-front

This commit is contained in:
Elam Monnot 2023-01-20 09:46:08 +01:00
parent 0cd9f1bb4c
commit 79c7bd34e6

View File

@ -1,11 +1,25 @@
--- - name: install haproxy
- name: Installation d'HAproxy apt:
apt: pkg=haproxy state=present update_cache=yes name: haproxy
state: present
- name: Fichier de configuration - name: parametre backend et fontend
copy: src=haproxy.cfg dest=/etc/haproxy/haproxy.cfg blockinfile:
notify: path: /etc/haproxy/haproxy.cfg
- restart haproxy block: |
frontend proxypublic
bind 192.168.56.2:80
default_backend fermeweb
backend fermeweb
balance roundrobin
option httpclose
#option httpchk HEAD / HTTP/1.0
server web1.test 192.168.56.3:80 check
#server web2.test 192.168.56.4:80 check
- name: Copie de goss - name: redemarre haproxy
copy: src=goss.yaml dest=/root service:
name: haproxy
state: restarted
enabled: yes