xoxys.postfix_relay/tasks/config_univention.yml
Robert Kaussow d40acd45c4
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful
fix: fix loop control label
2024-09-29 14:12:57 +02:00

38 lines
984 B
YAML

---
- name: Set postfix settings to registry
xoxys.general.ucr:
path: "{{ item.path }}"
value: "{{ item.value }}"
state: "{{ item.state | default('present') }}"
loop: "{{ __postfix_registry_settings }}"
loop_control:
label: "{{ item.path }}={{ item.value }}"
- name: Create smtp_auth
ansible.builtin.template:
src: etc/postfix/sasl_passwd.j2
dest: /etc/postfix/smtp_auth
owner: root
group: root
mode: "0600"
register: __auth_result
- name: Ensure smtp_auth.db exist
ansible.builtin.stat:
path: /etc/postfix/smtp_auth.db
register: __authdb
- name: Create smtp_auth.db
ansible.builtin.command: /usr/sbin/postmap hash:/etc/postfix/smtp_auth
changed_when: False
when: not __authdb.stat.exists or __auth_result.changed
notify: __postfix_restart
- name: Set permissions for smtp_auth.db
ansible.builtin.file:
path: /etc/postfix/smtp_auth.db
owner: root
group: root
mode: "0600"
notify: __postfix_restart