- name: Install ModSecurity on Debian family
hosts: modsecurity_debian
become: true
tasks:
- name: Install ModSecurity packages
ansible.builtin.apt:
update_cache: true
name:
- libapache2-mod-security2
- modsecurity-crs
state: present
- name: Install ModSecurity on RHEL family
hosts: modsecurity_rhel
become: true
tasks:
- name: Install ModSecurity packages
ansible.builtin.dnf:
name:
- mod_security
- owasp-modsecurity-crs
state: present
failed_when: false