Role Detail

apolloclark.apache-modsecurity

Install and configure Apache mod_security2 module
Downloads
17
Type Ansible
Minimum Ansible Version 2.2
Installation $ ansible-galaxy install apolloclark.apache-modsecurity
Tags
apache
web
Last Commit
Last Imported
OS Platforms
Platform Version
Debian buster
Debian etch
Debian jessie
Debian lenny
Debian sid
Debian squeeze
Debian stretch
Debian wheezy
Ubuntu artful
Ubuntu bionic
Ubuntu lucid
Ubuntu maverick
Ubuntu natty
Ubuntu oneiric
Ubuntu precise
Ubuntu quantal
Ubuntu raring
Ubuntu saucy
Ubuntu trusty
Ubuntu utopic
Ubuntu vivid
Ubuntu wily
Ubuntu xenial
Ubuntu yakkety
Ubuntu zesty
Last 10 Imports
Completed Status
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS
SUCCESS

Ansible Role: apache-modsecurity

Ansible Role to install and configure Apache mod_security2 for Ubuntu.

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

Set the Apache config folder.

apache_conf_dir: "/etc/apache2/conf-available"

Set the location of the log file.

sec_audit_log: "/var/log/apache/apache_audit_log.log"

Configure which parts of the HTTP request and response will be logged.

sec_audit_log_parts: "ABIFHZ" # # ABCDEFGHIJKZ

Set the HTTP "X-Powered-By" header value.

sec_server_signature: "Apache 7000"

Set which rules to not log.

sec_rule_remove_by_id: "960017,970901,960015"

Dependencies

Must have installed Apache. I would suggest:

geerlingguy.apache

Example Playbook

- hosts: all
  roles:
    - apolloclark.apache-modsecurity

License

MIT / BSD

Author Information

This role was created in 2017 by Apollo Clark

None