diff --git a/pkg/aa/templates/rule/comment.j2 b/pkg/aa/templates/rule/comment.j2 index abe41963..c013f893 100644 --- a/pkg/aa/templates/rule/comment.j2 +++ b/pkg/aa/templates/rule/comment.j2 @@ -7,7 +7,7 @@ {{- if .IsLineRule }} {{- "#" -}} {{- else -}} - {{- " #" -}} + {{- " #" -}} {{- end -}} {{- if .FileInherit -}} {{- " file_inherit" -}} diff --git a/pkg/aa/templates/rule/file.j2 b/pkg/aa/templates/rule/file.j2 index 566e7442..8fc82698 100644 --- a/pkg/aa/templates/rule/file.j2 +++ b/pkg/aa/templates/rule/file.j2 @@ -19,6 +19,9 @@ {{ " -> " }}{{ . }} {{- end -}} {{- "," -}} + {{- with .Suffix -}} + {{ . }} + {{- end -}} {{- template "comment" . -}} {{- end -}} @@ -37,5 +40,8 @@ {{ "-> " }}{{ . }} {{- end -}} {{- "," -}} + {{- with .Suffix -}} + {{ . }} + {{- end -}} {{- template "comment" . -}} {{- end -}} diff --git a/pkg/aa/templates/rules.j2 b/pkg/aa/templates/rules.j2 index efc057e0..9c08abfe 100644 --- a/pkg/aa/templates/rules.j2 +++ b/pkg/aa/templates/rules.j2 @@ -12,6 +12,7 @@ {{- continue -}} {{- end -}} {{- if eq $kind "comment" -}} + {{- indent "" -}} {{- template "comment" . -}} {{- "\n" -}} {{- continue -}}