first commit
This commit is contained in:
28
solutions/roles/balancer/tasks/main.yml
Normal file
28
solutions/roles/balancer/tasks/main.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
- name: Install HAProxy
|
||||
ansible.builtin.dnf:
|
||||
name: haproxy
|
||||
state: present
|
||||
|
||||
- name: Enable and start HAProxy
|
||||
ansible.builtin.service:
|
||||
name: haproxy
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Deploy HAProxy configuration
|
||||
ansible.builtin.template:
|
||||
src: haproxy.cfg.j2
|
||||
dest: /etc/haproxy/haproxy.cfg
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
notify: Restart haproxy
|
||||
|
||||
- name: Allow port 80 through firewalld
|
||||
ansible.posix.firewalld:
|
||||
service: http
|
||||
permanent: true
|
||||
immediate: true
|
||||
state: enabled
|
||||
|
||||
Reference in New Issue
Block a user