kvm-host: Add firewall rule for DRBD
Some checks failed
gitea/ansible-roles/pipeline/head There was a failure building this commit

This commit is contained in:
Alexis Ben Miloud--Josselin 2023-12-13 12:21:37 +01:00 committed by Jérémy Lecour
parent 13284645de
commit 7c2fd5e394
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY
3 changed files with 13 additions and 1 deletions

View file

@ -10,4 +10,5 @@ kvm_pair: null
lvm_filter:
- '"a|^/dev/sd[a-zA-Z]+[0-9]*$|"'
- '"a|^/dev/nvme[0-9]+(n[0-9]+)?(p[0-9]+)?$|"'
- '"a|^/dev/md[0-9]+$|"'
- '"a|^/dev/md[0-9]+$|"'
kvm_drbd_interface: null

View file

@ -0,0 +1,9 @@
---
- name: Allow all traffic through DRBD interface
ansible.builtin.lineinfile:
path: /etc/minifirewall.d/drbd
line: "/sbin/iptables -I INPUT -p tcp -i {{ kvm_drbd_interface }} -j ACCEPT"
create: yes
when:
- kvm_drbd_interface is defined
- kvm_drbd_interface | length > 0

View file

@ -16,3 +16,5 @@
- ansible.builtin.include: images.yml
- ansible.builtin.include: tools.yml
- ansible.builtin.include: firewall.yml