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