diff --git a/app/scripts/ansible/roles/haproxy/tasks/configure.yml b/app/scripts/ansible/roles/haproxy/tasks/configure.yml index 7c1f8fde..592d3178 100644 --- a/app/scripts/ansible/roles/haproxy/tasks/configure.yml +++ b/app/scripts/ansible/roles/haproxy/tasks/configure.yml @@ -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 diff --git a/app/scripts/ansible/roles/haproxy/tasks/installation.yml b/app/scripts/ansible/roles/haproxy/tasks/installation.yml index 1654083e..02dae605 100644 --- a/app/scripts/ansible/roles/haproxy/tasks/installation.yml +++ b/app/scripts/ansible/roles/haproxy/tasks/installation.yml @@ -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