-
Notifications
You must be signed in to change notification settings - Fork 0
/
haproxy.yml
31 lines (25 loc) · 882 Bytes
/
haproxy.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
- hosts: haproxy
vars_prompt:
- name: np
prompt: "Enter the port no. to bind the Load Balancer"
private: no
tasks:
- name: "Installling HAproxy"
package:
name: "haproxy"
state: present
- name: "Configuring haproxy.cfg"
template:
src: haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
- name: "Managing SElinux service to allow on custom port"
community.general.seport:
ports: 0{{ np }}
proto: tcp
setype: http_port_t
state: present
- name: "Starting Haproxy"
service:
name: haproxy
state: restarted
enabled: yes