fix Template Scope

This commit is contained in:
Samuel Lorch 2023-03-02 00:40:07 +01:00
parent 82f90aabb8
commit 06a0d20404
3 changed files with 3 additions and 3 deletions

View file

@ -1,2 +1,2 @@
{{ range $rule := .Netfilter.DestinationNATRules }}
{{ matcher .Services .Addresses $rule.Match }}{{ if $rule.Counter }} counter{{ end }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}
{{ matcher $.Services $.Addresses $rule.Match }}{{ if $rule.Counter }} counter{{ end }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}

View file

@ -1,2 +1,2 @@
{{range $rule := .Netfilter.ForwardRules}}
{{ matcher .Services .Addresses $rule.Match }}{{ if $rule.Counter }} counter{{ end }} {{ $rule.Verdict.String }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}
{{ matcher $.Services $.Addresses $rule.Match }}{{ if $rule.Counter }} counter{{ end }} {{ $rule.Verdict.String }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}

View file

@ -1,2 +1,2 @@
{{ range $rule := .Netfilter.SourceNATRules }}
{{ matcher .Services .Addresses $rule.Match }}{{ if $rule.Counter }} counter{{ end }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}
{{ matcher $.Services $.Addresses $rule.Match }}{{ if $rule.Counter }} counter{{ end }}{{ if ne $rule.Comment "" }} comment "{{ $rule.Comment }}"{{ end }}{{ end }}