Skip to content

Commit c324a3f

Browse files
Make sure that the /etc/postfix/main.cf configuration contain only one file with desired config
1 parent 3268ddd commit c324a3f

File tree

1 file changed

+1
-6
lines changed
  • linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/ansible

1 file changed

+1
-6
lines changed

linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/ansible/shared.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@
44
# complexity = low
55
# disruption = low
66
{{{ ansible_instantiate_variables("var_postfix_inet_interfaces") }}}
7-
8-
- name: "Gather list of packages"
9-
ansible.builtin.package_facts:
10-
manager: auto
11-
12-
{{{ ansible_lineinfile(msg='Make changes to Postfix configuration file', path='/etc/postfix/main.cf', regex='^inet_interfaces\s*=\s.*', insensitive='false', new_line='inet_interfaces = {{ var_postfix_inet_interfaces }}', create='no', state='present', insert_after='^inet_interfaces\s*=\s.*', when='"postfix" in ansible_facts.packages', rule_title=rule_title) }}}
7+
{{{ ansible_only_lineinfile(msg='Make changes to Postfix configuration file', path='/etc/postfix/main.cf', line_regex='^inet_interfaces\s*=\s*.*$', new_line='inet_interfaces = {{ var_postfix_inet_interfaces }}', create='no', block=True, rule_title=rule_title) }}}

0 commit comments

Comments
 (0)