11#
22# Example pillar configuration
33#
4+ ---
45
56haproxy:
67 # use lookup section to override 'map.jinja' values
7- #lookup:
8- #user: 'custom-user'
9- #group: 'custom-group'
10- # new setting to override configuration file path
11- #config_file: /etc/haproxy/haproxy.cfg
12- enabled: True
13- overwrite: True # Overwrite an existing config file if present (default behaviour unless set to false)
8+ # lookup:
9+ # user: 'custom-user'
10+ # group: 'custom-group'
11+ # new setting to override configuration file path
12+ # config_file: /etc/haproxy/haproxy.cfg
13+ enabled: true
14+ # Overwrite an existing config file if present
15+ # (default behaviour unless set to false)
16+ overwrite: true
1417 # old setting to override configuration file path, kept for compatibility
15- #config_file_path: /etc/haproxy/haproxy.cfg
18+ # config_file_path: /etc/haproxy/haproxy.cfg
1619 global:
1720 log:
1821 - 127.0.0.1 local2
@@ -22,32 +25,31 @@ haproxy:
2225 # Optional log-send-hostname parameter, sets the hostname field in the syslog header
2326 log-send-hostname: localhost
2427 stats:
25- enable: True
28+ enable: true
2629 socketpath: /var/lib/haproxy/stats
2730 mode: 660
2831 level: admin
32+ # yamllint disable-line rule:line-length
2933 # Optional extra bind parameter, for example to set the owner/group on the socket file
3034 extra: user haproxy group haproxy
35+ # yamllint disable-line rule:line-length
3136 ssl-default-bind-ciphers: "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384"
3237 ssl-default-bind-options: "no-sslv3 no-tlsv10 no-tlsv11"
3338
3439 user: haproxy
3540 group: haproxy
3641 chroot:
37- enable: True
42+ enable: true
3843 path: /var/lib/haproxy
3944
40- daemon: True
45+ daemon: true
4146
4247
4348 userlists:
4449 userlist1:
4550 users:
4651 john: insecure-password doe
4752 sam: insecure-password frodo
48- # groups:
49- # admins: users john sam
50- # guests: users jekyll hyde jane
5153
5254 defaults:
5355 log: global
@@ -58,6 +60,7 @@ haproxy:
5860 - dontlognull
5961 - forwardfor
6062 - http-server-close
63+ # yamllint disable-line rule:line-length
6164 logformat: "%ci:%cp\\ [%t]\\ %ft\\ %b/%s\\ %Tq/%Tw/%Tc/%Tr/%Tt\\ %ST\\ %B\\ %CC\\ %CS\\ %tsc\\ %ac/%fc/%bc/%sc/%rc\\ %sq/%bq\\ %hr\\ %hs\\ %{+Q}r"
6265 timeouts:
6366 - http-request 10s
@@ -82,7 +85,6 @@ haproxy:
8285 503: /etc/haproxy/errors/503.http
8386 504: /etc/haproxy/errors/504.http
8487
85- {# Suported by HAProxy 1.6 #}
8688 resolvers:
8789 local_dns:
8890 options:
@@ -98,7 +100,7 @@ haproxy:
98100 - "0.0.0.0:8998"
99101 mode: http
100102 stats:
101- enable: True
103+ enable: true
102104 uri: "/admin?stats"
103105 refresh: "20s"
104106 myservice:
@@ -153,35 +155,36 @@ haproxy:
153155 frontend1:
154156 name: www-http
155157 bind: "*:80"
156- redirects:
158+ redirects:
157159 - scheme https if !{ ssl_fc }
158160 reqadds:
159161 - "X-Forwarded-Proto:\\ http"
160162 default_backend: www-backend
161163
162- # www-https:
163- # bind: "*:443 ssl crt /etc/ssl/private/certificate-chain-and-key-combined.pem"
164- # logformat: "%ci:%cp\\ [%t]\\ %ft\\ %b/%s\\ %Tq/%Tw/%Tc/%Tr/%Tt\\ %ST\\ %B\\ %CC\\ %CS\\ %tsc\\ %ac/%fc/%bc/%sc/%rc\\ %sq/%bq\\ %hr\\ %hs\\ %{+Q}r\\ ssl_version:%sslv\\ ssl_cipher:%sslc"
165- # reqadds:
166- # - "X-Forwarded-Proto:\\ https"
167- # default_backend: www-backend
168- # acls:
169- # - url_static path_beg -i /static /images /javascript /stylesheets
170- # - url_static path_end -i .jpg .gif .png .css .js
171- # use_backends:
172- # - static-backend if url_static
173- # extra: "rspadd Strict-Transport-Security:\ max-age=15768000"
174- # some-services:
175- # bind:
176- # - "*:8080"
177- # - "*:8088"
178- # default_backend: api-backend
164+ # www-https:
165+ # bind: "*:443 ssl crt /etc/ssl/private/certificate-chain-and-key-combined.pem"
166+ # yamllint disable-line rule:line-length
167+ # logformat: "%ci:%cp\\ [%t]\\ %ft\\ %b/%s\\ %Tq/%Tw/%Tc/%Tr/%Tt\\ %ST\\ %B\\ %CC\\ %CS\\ %tsc\\ %ac/%fc/%bc/%sc/%rc\\ %sq/%bq\\ %hr\\ %hs\\ %{+Q}r\\ ssl_version:%sslv\\ ssl_cipher:%sslc"
168+ # reqadds:
169+ # - "X-Forwarded-Proto:\\ https"
170+ # default_backend: www-backend
171+ # acls:
172+ # - url_static path_beg -i /static /images /javascript /stylesheets
173+ # - url_static path_end -i .jpg .gif .png .css .js
174+ # use_backends:
175+ # - static-backend if url_static
176+ # extra: "rspadd Strict-Transport-Security:\ max-age=15768000"
177+ # some-services:
178+ # bind:
179+ # - "*:8080"
180+ # - "*:8088"
181+ # default_backend: api-backend
179182
180183 backends:
181184 backend1:
182185 name: www-backend
183186 balance: roundrobin
184- redirects:
187+ redirects:
185188 - scheme https if !{ ssl_fc }
186189 extra: "reqidel ^X-Forwarded-For:"
187190 servers:
@@ -192,7 +195,7 @@ haproxy:
192195 check: check
193196 static-backend:
194197 balance: roundrobin
195- redirects:
198+ redirects:
196199 - scheme https if !{ ssl_fc }
197200 options:
198201 - http-server-close
@@ -201,7 +204,7 @@ haproxy:
201204 - httplog
202205 cookie: "pm insert indirect"
203206 stats:
204- enable: True
207+ enable: true
205208 uri: /url/to/stats
206209 realm: LoadBalancer
207210 auth: "user:password"
0 commit comments