-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconverge.yml
85 lines (83 loc) · 2.33 KB
/
converge.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: ansible-role-haproxy
haproxy_frontends:
- name: http
address: "*"
port: 80
default_backend: backend
- name: https
address: "*"
port: 443
default_backend: backend
ssl: true
crts:
- /tmp/haproxy.keycrt
- name: smtp
address: "*"
port: 25
default_backend: smtp
mode: tcp
- name: prometheus
address: "*"
port: 8405
mode: http
http_request: use-service prometheus-exporter
no_log: true
haproxy_backend_default_balance: roundrobin
haproxy_backends:
- name: backend
httpcheck: true
# You can tell how the health check must be done.
# This requires haproxy version 2
# http_check:
# send:
# method: GET
# uri: /health.html
# expect: status 200
balance: roundrobin
# You can refer to hosts in an Ansible group.
# The `ansible_default_ipv4` will be used as an address to connect to.
servers: "{{ groups['all'] }}"
port: 8080
options:
- check
- name: smtp
balance: leastconn
mode: tcp
# You can also refer to a list of servers.
servers:
- name: first
address: "127.0.0.1"
port: 25
- name: second
address: "127.0.0.2"
port: 25
port: 25
- name: vault
mode: tcp
httpcheck: GET /v1/sys/health HTTP/1.1
servers: "{{ groups['all'] }}"
http_send_name_header: Host
port: 8200
options:
- check
- check-ssl
- ssl verify none
haproxy_listen_default_balance: roundrobin
haproxy_listens:
- name: listen
address: "*"
httpcheck: true
listen_port: 8081
balance: roundrobin
# You can refer to hosts in an Ansible group.
# The `ansible_default_ipv4` will be used as an address to connect to.
servers: "{{ groups['all'] }}"
port: 8080
options:
- maxconn 100000