Ajout Vagarntfile et playbooks pour kea dhcp HA
This commit is contained in:
29
kea-dhcp-ha/provision/setup-lb.yml
Normal file
29
kea-dhcp-ha/provision/setup-lb.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: install haproxy
|
||||
apt:
|
||||
name: haproxy
|
||||
state: present
|
||||
|
||||
- name: parametre backend et fontend
|
||||
blockinfile:
|
||||
path: /etc/haproxy/haproxy.cfg
|
||||
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: redemarre haproxy
|
||||
service:
|
||||
name: haproxy
|
||||
state: restarted
|
||||
enabled: yes
|
Reference in New Issue
Block a user