mirror of https://github.com/Aidaho12/haproxy-wi
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
parent
5b8df16ba9
commit
ed0c1fddee
|
@ -61,20 +61,3 @@
|
||||||
dest: /etc/haproxy/haproxy.cfg
|
dest: /etc/haproxy/haproxy.cfg
|
||||||
mode: 0644
|
mode: 0644
|
||||||
force: no
|
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
|
|
||||||
|
|
|
@ -98,6 +98,23 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and haproxy_from_wi is defined
|
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
|
- name: Enable and start service HAProxy
|
||||||
systemd:
|
systemd:
|
||||||
name: haproxy
|
name: haproxy
|
||||||
|
|
Loading…
Reference in New Issue