Disable DNS for postfix in testing

This commit is contained in:
Wojciech Kozlowski 2022-12-20 18:26:18 +01:00
parent 4d797ed4c4
commit c3244f9ac2
4 changed files with 11 additions and 2 deletions

View File

@ -4,7 +4,5 @@ gathering = smart
fact_caching = ansible.builtin.jsonfile
fact_caching_connection = fact_cache
filter_plugins = plugins/filter
[privilege_escalation]
become = True

View File

@ -5,6 +5,9 @@ argument_specs:
ansible_hostname:
type: "str"
required: true
system_base_mail_disable_dns:
type: "bool"
required: true
system_mail_domain:
type: "str"
required: true

View File

@ -46,6 +46,12 @@ recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all
{% if system_base_mail_disable_dns %}
smtp_host_lookup=native
disable_dns_lookups = yes
ignore_mx_lookup_error = yes
{% endif %}
# SASL parameters
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous

View File

@ -42,6 +42,8 @@
- "system:base"
- "system:base:nftables"
- role: "system/base/mail"
vars:
system_base_mail_disable_dns: "{{ not (the_nine_worlds_production | bool) }}"
tags:
- "system:base"
- "system:base:mail"