Adding option for authentication
This commit is contained in:
parent
184abe0197
commit
1d325903d5
3 changed files with 10 additions and 1 deletions
|
@ -8,6 +8,7 @@ haproxy_config_file: "example.haproxy.cfg.j2"
|
|||
haproxy_shared_ip: ""
|
||||
haproxy_shared_ip_subnet: "/24"
|
||||
haproxy_shared_virtual_router_id: 25
|
||||
haproxy_shared_password: ""
|
||||
haproxy_keepalived_process_weight: 10
|
||||
haproxy_listen_ports:
|
||||
- port : 22
|
||||
|
|
|
@ -14,6 +14,13 @@ vrrp_instance VI_1 {
|
|||
virtual_router_id {{ haproxy_shared_virtual_router_id }}
|
||||
priority {{ haproxy_shared_priority }}
|
||||
|
||||
{% if haproxy_shared_password != '' %}
|
||||
authentication {
|
||||
auth_type PASS
|
||||
auth_pass {{ haproxy_shared_password }}
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
virtual_ipaddress {
|
||||
{{ haproxy_shared_ip }}{{ haproxy_shared_ip_subnet }} dev {{ haproxy_bind_adapter }}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue