v8.1.5: Refactor HAProxy task organization for better structure

Moved HAProxy state file and stats directory creation tasks from `configure.yml` to `installation.yml` for improved logical grouping. This change ensures installation-related tasks are consolidated, enhancing maintainability and clarity.
pull/418/head
Aidaho 2025-01-16 18:00:10 +03:00
parent 5b8df16ba9
commit ed0c1fddee
2 changed files with 17 additions and 17 deletions

View File

@ -61,20 +61,3 @@
dest: /etc/haproxy/haproxy.cfg
mode: 0644
force: no
- name: Copy HAProxy state file in place.
template:
src: haproxy.state.j2
dest: /etc/haproxy/haproxy.state
owner: haproxy
group: haproxy
mode: 0644
force: no
- name: Creates HAProxy stats directory
file:
path: /var/lib/haproxy
owner: haproxy
group: haproxy
state: directory
ignore_errors: yes

View File

@ -98,6 +98,23 @@
mode: 0644
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and haproxy_from_wi is defined
- name: Copy HAProxy state file in place.
template:
src: haproxy.state.j2
dest: /etc/haproxy/haproxy.state
owner: haproxy
group: haproxy
mode: 0644
force: no
- name: Creates HAProxy stats directory
file:
path: /var/lib/haproxy
owner: haproxy
group: haproxy
state: directory
ignore_errors: yes
- name: Enable and start service HAProxy
systemd:
name: haproxy