-
Notifications
You must be signed in to change notification settings - Fork 7
/
modsecSetup.yaml
executable file
·33 lines (33 loc) · 1.31 KB
/
modsecSetup.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
# Clone the ModSecurity Repo into our scratch
- name: Clone ModSec Repo
git: repo=git://github.com/SpiderLabs/ModSecurity/
dest="{{ ScratchLocation }}/ModSecurity"
version=HEAD
update=no
# Install ModSecurity
- name: Check if configure already exists
stat: path="{{ ScratchLocation }}/ModSecurity/configure"
register: configureStat
- name: Run autogen.sh
command: ./autogen.sh chdir="{{ ScratchLocation }}/ModSecurity"
register: hello
- debug: msg="{{ hello.stdout }}"
- debug: msg="{{ hello.stderr }}"
when: not configureStat.stat.exists
- name: Check if Makefile already exists
stat: path="{{ ScratchLocation }}/ModSecurity/Makefile"
register: makeStat
- name: Run ./configure
command: ./configure chdir="{{ ScratchLocation }}/ModSecurity"
when: not makeStat.stat.exists
# Currently a bug in Ansible
- name: Check if mod_security2.so already exists
stat: path="{{ ScratchLocation }}/apache2/.libs/mod_security2.so"
register: soStat
- name: Run make
command: make chdir="{{ ScratchLocation }}/ModSecurity"
when: not soStat.stat.exists
- name: run Make install
command: make install chdir="{{ ScratchLocation }}/ModSecurity"
when: not soStat.stat.exists