initial upload
This commit is contained in:
38
roles/apache/tasks/mod_security.yml
Normal file
38
roles/apache/tasks/mod_security.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
|
||||
- name: Install Apache mod_security
|
||||
apt:
|
||||
pkg:
|
||||
- libapache2-mod-security2=2.9.*
|
||||
- modsecurity-crs=3.*
|
||||
state: present
|
||||
notify: Restart Apache
|
||||
tags: packages
|
||||
|
||||
- name: Install Apache mod_security config
|
||||
template:
|
||||
dest: /etc/modsecurity/modsecurity.conf
|
||||
src: etc_modsecurity_modsecurity.conf.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
notify: Reload Apache
|
||||
tags: configs
|
||||
|
||||
- name: Install Apache mod_security ruleset config
|
||||
template:
|
||||
dest: /etc/modsecurity/crs/crs-setup.conf
|
||||
src: etc_modsecurity_crs_crs-setup.conf.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: root
|
||||
notify: Reload Apache
|
||||
tags: configs
|
||||
|
||||
- name: Enable Apache mod_security
|
||||
apache2_module:
|
||||
name: security2
|
||||
state: present
|
||||
force: yes
|
||||
notify: Restart Apache
|
||||
tags: configs
|
||||
Reference in New Issue
Block a user