forked from mrlesmithjr/ansible-squid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
52 lines (52 loc) · 1.46 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
- hosts: squid_proxy
vars:
haproxy_config: true
haproxy_configs:
- name: 'squid-3128'
backend_checks: true
backend_name: 'squid-servers'
backend_servers_bind_port: '3128'
backend_servers_group: 'squid_proxy'
balance: 'roundrobin'
default_server_options:
- name: 'maxconn'
value: '256'
- name: 'maxqueue'
value: '128'
- name: 'weight'
value: '100'
enabled: true
frontend_bind_address: '{{ haproxy_lb_vip }}'
frontend_bind_port: '8080'
frontend_name: 'squid-in'
mode: 'tcp'
options:
- 'tcplog'
# - 'httpchk'
haproxy_lb_vip: '192.168.250.50'
keepalived_config: true
keepalived_router_info:
- name: 'vrrp_1'
check_script:
- name: 'chk_haproxy'
script: 'killall -0 haproxy'
interval: 2
weight: 2
master_node: "{{ groups['squid_proxy'][0] }}"
router_id: '50'
router_pri_backup: '100'
router_pri_master: '150'
vip_int: '{{ ansible_enp0s8.device }}'
vip_addresses:
- '{{ haproxy_lb_vip }}'
squid_pri_domain_name: 'test.vagrant.local'
squid_enable_haproxy: true
squid_enable_keepalived: true
roles:
- role: ansible-keepalived
when: squid_enable_keepalived
- role: ansible-squid
- role: ansible-haproxy
when: squid_enable_haproxy
tasks: