Compare commits
2 Commits
v0.0.2a-ps
...
v0.0.2c-em
Author | SHA1 | Date | |
---|---|---|---|
79c7bd34e6 | |||
0cd9f1bb4c |
@ -1,11 +1,25 @@
|
||||
---
|
||||
- name: Installation d'HAproxy
|
||||
apt: pkg=haproxy state=present update_cache=yes
|
||||
- name: install haproxy
|
||||
apt:
|
||||
name: haproxy
|
||||
state: present
|
||||
|
||||
- name: Fichier de configuration
|
||||
copy: src=haproxy.cfg dest=/etc/haproxy/haproxy.cfg
|
||||
notify:
|
||||
- restart haproxy
|
||||
- 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: Copie de goss
|
||||
copy: src=goss.yaml dest=/root
|
||||
- name: redemarre haproxy
|
||||
service:
|
||||
name: haproxy
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
@ -8,37 +8,30 @@ iface lo inet loopback
|
||||
# Reseau N-adm
|
||||
allow-hotplug enp0s3
|
||||
iface enp0s3 inet static
|
||||
address 192.168.99.12
|
||||
netmask 255.255.255.0
|
||||
address 192.168.99.12/24
|
||||
|
||||
|
||||
# Reseau liaison avec r-ext
|
||||
allow-hotplug enp0s8
|
||||
iface enp0s8 inet static
|
||||
address 192.168.200.254
|
||||
netmask 255.255.255.0
|
||||
address 192.168.200.254/24
|
||||
gateway 192.168.200.253
|
||||
up ip route add default via 192.168.200.253
|
||||
|
||||
|
||||
# Reseau wifi
|
||||
allow-hotplug enp0s9
|
||||
iface enp0s9 inet static
|
||||
address 172.16.65.254
|
||||
netmask 255.255.255.0
|
||||
address 172.16.65.254/24
|
||||
|
||||
|
||||
# Reseau user
|
||||
allow-hotplug enp0s10
|
||||
iface enp0s10 inet static
|
||||
address 172.16.64.254
|
||||
netmask 255.255.255.0
|
||||
address 172.16.64.254/24
|
||||
|
||||
|
||||
# Reseau infra
|
||||
allow-hotplug enp0s16
|
||||
iface enp0s16 inet static
|
||||
address 172.16.0.254
|
||||
netmask 255.255.255.0
|
||||
up /root/routagenat
|
||||
address 172.16.0.254/24
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
- name: Copie du fichier sysctl.conf
|
||||
copy: src=sysctl.conf dest=/etc/
|
||||
|
||||
- name: copier le script de routage
|
||||
copy: src=routagenat dest=/root/
|
||||
#- name: copier le script de routage
|
||||
# copy: src=routagenat dest=/root/
|
||||
|
||||
- name: rendre executabe le script
|
||||
shell: chmod +x /root/routagenat
|
||||
#- name: rendre executabe le script
|
||||
# shell: chmod +x /root/routagenat
|
||||
|
||||
#- name: exectuer le script
|
||||
# script: /root/routagenat
|
||||
|
Reference in New Issue
Block a user