-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaybook.yml
55 lines (45 loc) · 1.7 KB
/
playbook.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
- hosts: all
become: yes
tasks:
#Install Suricata
- name: Enable Suricata repository
apt_repository:
repo: ppa:oisf/suricata-stable
- name: Install Suricata
apt:
name: suricata
- name: Install Python3-pip
apt:
name: python3-pip
- name: Install pyyaml from pip
pip:
name: pyyaml
executable: pip3
- name: Install Suricata Update from github using pip
command: pip3 install https://github.com/OISF/suricata-update/archive/master.zip
- name: Upgrade Suricata
command: pip3 install --pre --upgrade suricata-update
- name: Update Suricata rules and add free available rule sources
command: suricata-update update-sources
command: suricata-update enable-source oisf/trafficid
command: suricata-update enable-source etnetera/aggressive
command: suricata-update enable-source sslbl/ssl-fp-blacklist
command: suricata-update enable-source et/open
command: suricata-update enable-source tgreen/hunting
command: suricata-update enable-source sslbl/ja3-fingerprints
command: suricata-update enable-source ptresearch/attackdetection
command: suricata-update
#You can copy your already prepared Suricata configuration file to the instance if you have one. Uncomment the next four lines to do this.
#- name: Copy Suricata configuration file
# copy:
# src: ./suricata.yaml
# dest: /etc/suricata/suricata.yaml
- name: Enable Suricata service
service:
name: suricata
enabled: yes
- name: Start Suricata service
service:
name: suricata
state: started