role_nftables/README.md

48 lines
918 B
Markdown
Raw Normal View History

2022-10-03 16:15:12 +00:00
# role_nftables
2022-10-03 15:50:48 +00:00
2022-10-03 16:15:12 +00:00
Ce rôle permet d'installer et configurer nftables.
## Variables
### nftables_rules_*
2022-10-03 16:15:12 +00:00
Liste contenant un nom de fichier et une liste de règles. Les règles doivent être au format nftables.
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
### nftables_tables_*
2022-10-03 16:15:12 +00:00
Liste contenant un nom de fichier et la configuration de la table. La table doit être au format nftables.
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
## Exemple d'utilisation
### inventory.yml
```yaml
---
all:
hosts:
host1.ykn.local:
host2.ykn.local:
children:
dnsservers:
hosts:
dnsmasq1.ykn.local:
dnsmasq2.ykn.local:
```
### host_vars/host1.ykn.local.yml
```yaml
---
nftables_rules:
- filename: ansible
rules:
- ip saddr 192.168.50.12 tcp dport 22 accept
- ip6 saddr fd00:ff50::d012 tcp dport 22 accept
```