Browse Source

postfix: allow empty postfix-service-group

Fixes: main/infrastructure#347
keep-around/d8684846d59ae1f6e4210b72b043d80fe7d98783
Loïc Dachary 7 months ago
parent
commit
d8684846d5
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 2
      inventory/group_vars/all/postfix.yml
  2. 2
      playbooks/postfix/postfix-client-playbook.yml

2
inventory/group_vars/all/postfix.yml

@ -4,7 +4,7 @@
#
# fqdn of the relay to which the client must send mail
#
postfix_client_relayhost: "{{ groups['postfix-service-group'][0] }}.{{ domain }}"
postfix_client_relayhost: "{{ groups['postfix-service-group'] | first | default('MISSING') }}.{{ domain }}"
#
#############################################
#

2
playbooks/postfix/postfix-client-playbook.yml

@ -21,7 +21,7 @@
- role: debops.postfix
postfix__mailname: '{{ postfix_client_mailname | default(domain) }}'
postfix__fqdn: '{{ postfix_client_fqdn | default(inventory_hostname + "." + domain) }}'
postfix__relayhost: '[{{ postfix_client_relayhost | default(groups["postfix-service-group"][0] + "." + domain) }}]:465'
postfix__relayhost: '[{{ postfix_client_relayhost | default((groups["postfix-service-group"] | first | default("MISSING")) + "." + domain) }}]:465'
postfix__maincf:
- name: 'smtpd_recipient_restrictions'
section: 'restrictions'

Loading…
Cancel
Save