From 9e791c7111087c53355975811702679a334b0611 Mon Sep 17 00:00:00 2001 From: Aidaho Date: Wed, 11 Dec 2024 05:38:42 +0300 Subject: [PATCH] v8.1.3: Move HAProxy service file task to installation.yml Relocated the task for modifying the HAProxy service file from configure.yml to installation.yml to ensure proper execution during the installation phase. This change enhances task organization and aligns with Ansible role structures. --- app/scripts/ansible/roles/haproxy/tasks/configure.yml | 7 ------- app/scripts/ansible/roles/haproxy/tasks/installation.yml | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/scripts/ansible/roles/haproxy/tasks/configure.yml b/app/scripts/ansible/roles/haproxy/tasks/configure.yml index 66691ab8..7396397a 100644 --- a/app/scripts/ansible/roles/haproxy/tasks/configure.yml +++ b/app/scripts/ansible/roles/haproxy/tasks/configure.yml @@ -1,10 +1,3 @@ -- name: Change wrong HAProxy service file - template: - src: haproxy.service.j2 - dest: /usr/lib/systemd/system/haproxy.service - mode: 0644 - when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and haproxy_from_wi is defined - - name: test to see if selinux is running command: getenforce register: sestatus diff --git a/app/scripts/ansible/roles/haproxy/tasks/installation.yml b/app/scripts/ansible/roles/haproxy/tasks/installation.yml index ad6e3542..1654083e 100644 --- a/app/scripts/ansible/roles/haproxy/tasks/installation.yml +++ b/app/scripts/ansible/roles/haproxy/tasks/installation.yml @@ -91,6 +91,13 @@ http_proxy: "{{PROXY}}" https_proxy: "{{PROXY}}" +- name: Change wrong HAProxy service file + template: + src: haproxy.service.j2 + dest: /usr/lib/systemd/system/haproxy.service + mode: 0644 + when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and haproxy_from_wi is defined + - name: Enable and start service HAProxy systemd: name: haproxy