Update regexp for rule 2.1.21 to be more strict when updating line in file; allows task to be idempotent with itself

Signed-off-by: Shawn Hardwick <time4swim@gmail.com>
This commit is contained in:
Shawn Hardwick 2025-02-05 12:02:23 -05:00
parent 8a38650658
commit 1cf3c4d58b
No known key found for this signature in database
GPG Key ID: 2F156DF1396D01DF
1 changed files with 1 additions and 1 deletions

View File

@ -699,7 +699,7 @@
notify: Restart postfix
ansible.builtin.lineinfile:
path: /etc/postfix/main.cf
regexp: '^(#)?inet_interfaces'
regexp: '^(#)?inet_interfaces\s*=(?!\s*loopback-only\s*).*'
line: 'inet_interfaces = loopback-only'
- name: "2.1.21 | WARN | Ensure mail transfer agents are configured for local-only mode | Message out other main agents"