mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-12 00:03:17 +02:00
14 lines
419 B
YAML
14 lines
419 B
YAML
---
|
|
|
|
- name: Handle gitea ports in the firewall
|
|
iptables_raw:
|
|
name: "{{ item.name }}"
|
|
state: "{{ (item.src_ip | length > 0) | ternary('present','absent') }}"
|
|
rules: "-A INPUT -m state --state NEW -p tcp --dport {{ item.port }} -s {{ item.src_ip | join(',') }} -j ACCEPT"
|
|
loop:
|
|
- port: "{{ gitea_web_port }}"
|
|
name: gitea_web_port
|
|
src_ip: "{{ gitea_web_src_ip }}"
|
|
tags: firewall,gitea
|
|
|