EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 21d2e40a authored by Nicolas Baudoin's avatar Nicolas Baudoin
Browse files

Changes made to the script to have allowipv6 set to yes within a [Definition] file.

parent 082740ee
No related branches found
No related tags found
1 merge request!3Minor change to avoid an alert on Alpine with allowipv6
This commit is part of merge request !3. Comments created here will be created in the context of that merge request.
......@@ -22,12 +22,14 @@
# There was an error message with the restart of fail2ban on Alpine systems without that change.
# Also, it makes sure ipv6 is being analysed.
- name: Ensure allowipv6 with value yes line is present
lineinfile:
- name: Ensure [Definition] section and allowipv6 are present
blockinfile:
path: /etc/fail2ban/fail2ban.conf
regexp: '^\[Definition\]'
insertbefore: '^\[Thread\]'
line: 'allowipv6 = yes'
block: |
[Definition]
allowipv6 = yes
marker: "# {mark} ANSIBLE MANAGED BLOCK"
when: "'[Definition]' not in lookup('file', '/etc/fail2ban/fail2ban.conf') or 'allowipv6 =' not in lookup('file', '/etc/fail2ban/fail2ban.conf')"
# Updating fail2ban to be able to work with the way our nftables work
- name: Deploy custom nftables action for Fail2Ban
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment