Nachgezogener Arbeitsstand des Homelabs: - neue host_vars (k3s-*, gluster-*, docmost, paperless, kometa, thelounge, satisfactory, wolfstack-vm) - neue Rollen/Playbooks (net_watchdog, patchmon-agent, tc_ratelimit, sops-age, rotate-ssh-key, dns-doh, remove-postfix, checkrr-deploy) - diverse Rollen-Updates (base, borg, dns_resolver, frp_client, hawser, nvidia) Ausgeklammert (bleiben uncommittet): host_vars/docmost/vars.yml (Klartext-Token -> sollte vault-konform via vault_* referenziert werden). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
835 B
YAML
30 lines
835 B
YAML
---
|
|
- name: Disable postfix on all hosts
|
|
hosts: all
|
|
tasks:
|
|
- name: Check if postfix is installed
|
|
ansible.builtin.command: which postfix
|
|
register: postfix_check
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Stop and disable postfix
|
|
ansible.builtin.systemd:
|
|
name: postfix
|
|
state: stopped
|
|
enabled: false
|
|
when: postfix_check.rc == 0
|
|
|
|
- name: Set postfix to localhost-only
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/postfix/main.cf
|
|
regexp: '^inet_interfaces\s*='
|
|
line: 'inet_interfaces = loopback-only'
|
|
when: postfix_check.rc == 0
|
|
|
|
- name: Set relayhost to empty
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/postfix/main.cf
|
|
regexp: '^relayhost\s*='
|
|
line: 'relayhost ='
|
|
when: postfix_check.rc == 0
|