Update to 2022-07-21 01:00

This commit is contained in:
Daniel Berteaud
2022-07-21 01:00:17 +02:00
parent eca2f00fb1
commit 0db06a7240
32 changed files with 643 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
---
- name: Handle nomad ports in the firewall
iptables_raw:
name: nomad_port_{{ item }}
state: "{{ (('tcp' in nomad_services[item].proto or 'udp' in nomad_services[item].proto) and nomad_services[item].src_ip | length > 0) | ternary('present', 'absent') }}"
rules: |
{% if 'tcp' in nomad_services[item].proto %}
-A INPUT -m state --state NEW -p tcp --dport {{ nomad_services[item].port }} -j ACCEPT
{% endif %}
{% if 'udp' in nomad_services[item].proto %}
-A INPUT -m state --state NEW -p udp --dport {{ nomad_services[item].port }} -j ACCEPT
{% endif %}
loop: "{{ nomad_services.keys() | list }}"
tags: firewall,nomad