first commit
This commit is contained in:
36
tasks/haproxy.yml
Normal file
36
tasks/haproxy.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
- name: Enable epel
|
||||
yum:
|
||||
name: epel-release
|
||||
|
||||
- name: Install haproxy
|
||||
yum:
|
||||
name: haproxy
|
||||
|
||||
- name: python selinux package
|
||||
yum:
|
||||
name: python3-libselinux, policycoreutils-python-utils
|
||||
|
||||
- name: Allow haproxy to connect to any port
|
||||
seboolean:
|
||||
name: haproxy_connect_any
|
||||
persistent: yes
|
||||
state: yes
|
||||
|
||||
- name: Allow haproxy to listen on required ports
|
||||
seport:
|
||||
setype: http_port_t
|
||||
ports: ["80", "443", "6443", "22623"]
|
||||
proto: tcp
|
||||
|
||||
- name: Haproxy configuration
|
||||
template:
|
||||
src: haproxy.cfg.j2
|
||||
dest: /etc/haproxy/haproxy.cfg
|
||||
mode: 0644
|
||||
notify: Reload haproxy
|
||||
|
||||
- name: Haproxy service
|
||||
service:
|
||||
name: haproxy
|
||||
enabled: true
|
||||
state: started
|
||||
Reference in New Issue
Block a user