first commit

This commit is contained in:
Nils Cant
2020-05-05 17:30:40 +02:00
commit c48b02bd78
5 changed files with 211 additions and 0 deletions

36
tasks/haproxy.yml Normal file
View 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