---
- name: "check ngx_http_waf_module"
  stat:
    path: "{{ OS.nginx.dirs.conf }}/modules/ngx_http_waf_module.so"
  register: waf_module

- name: "install ngx_http_waf_module.so"
  copy:
    src: debian_ngx_http_waf_module.so
    dest: "{{ OS.nginx.dirs.conf }}/modules/ngx_http_waf_module.so"
    mode: 0644
  when: not waf_module.stat.exists

- name: "check librabbitmq"
  stat:
    path: "{{ OS.libs }}/librabbitmq.so.4"
  register: rabbitmq_module

- name: "install librabbitmq.so"
  copy:
    src: librabbitmq.so.4
    dest: "{{ OS.libs }}/librabbitmq.so.4"
    mode: 0644
  when: not rabbitmq_module.stat.exists
