20 lines
601 B
YAML
20 lines
601 B
YAML
|
- name: Download updated Community Rules
|
||
|
ansible.builtin.get_url:
|
||
|
url: https://www.snort.org/rules/community
|
||
|
dest: /tmp/snort_community_rules.tar.gz
|
||
|
|
||
|
- name: Extract Community Rules
|
||
|
ansible.builtin.unarchive:
|
||
|
src: /tmp/snort_community_rules.tar.gz
|
||
|
dest: /tmp/snort_community_rules
|
||
|
|
||
|
- name: Copy rules to snort config folder
|
||
|
ansible.builtin.copy:
|
||
|
src: "{{ item }}"
|
||
|
dest: /etc/snort/rules
|
||
|
with_fileglob:
|
||
|
- /tmp/snort_community_rules/*
|
||
|
|
||
|
- name: Activate Community rules
|
||
|
ansible.builtin.shell: sed -i 's/include $RULE_PATH/#include $RULE_PATH/' /etc/snort/snort.conf
|