- name: Installing HAProxy conf for rsyslog
  template:
   src: /var/www/haproxy-wi/app/scripts/ansible/roles/haproxy/templates/haproxy_rsyslog.conf.j2
   dest: /etc/rsyslog.d/49-haproxy.conf
   force: yes
  ignore_errors: yes
  notify: restart rsyslog

- name: Installing HAProxy conf for logrotate
  template:
    src: /var/www/haproxy-wi/app/scripts/ansible/roles/haproxy/templates/logrotate.conf.j2
    dest: /etc/logrotate.d/haproxy.conf
    force: no
  when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS')
  ignore_errors: yes