mg
d7dd0ef313
zed defaults zed syntax scrub syntax sanoid mit ts health syntax arc syntax tmux syntax smart syntax restic handler restic syntax postfix syntax chrony syntax muster script mit ts muster syntax motd meta motd syntax smb syntax f2b syntax moreutils als standardsoftware rasdaemon + cv4pve. date durch ts ersetzt dokuwiki defaults dokuwiki syntax cv4 handler entfernt apt manage sources: / in var apt install packages syntax apcupsd syntax acng defaults acng syntax Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#65 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
---
|
|
### postfix fuer gmail; http://dokuwiki2.grote.lan/artikel/technik/postfix_mit_gmail_fuer_benachrichtigungen_einrichten
|
|
- name: postfix + Hilfsprogramme installieren
|
|
become: yes
|
|
ansible.builtin.package:
|
|
name:
|
|
- postfix
|
|
- mailutils
|
|
- libsasl2-modules
|
|
state: present
|
|
|
|
- name: kopiere sasl_passwd
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: sasl_passwd
|
|
dest: /etc/postfix/sasl_passwd
|
|
force: yes
|
|
notify:
|
|
- hash_sasl_passwd
|
|
- postfix_testmail
|
|
|
|
- name: kopiere sender_canonical
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: sender_canonical
|
|
dest: /etc/postfix/sender_canonical
|
|
notify:
|
|
- hash_sender_canonical
|
|
- postfix_reload
|
|
- postfix_testmail
|
|
|
|
- name: kopiere postfix_main.cf
|
|
become: yes
|
|
ansible.builtin.template:
|
|
src: main.cf
|
|
dest: /etc/postfix/main.cf
|
|
notify:
|
|
- postfix_reload
|
|
- postfix_testmail
|
|
|
|
- name: Mail Cronjob - Anlegen
|
|
become: yes
|
|
when: postfix_mail_nach_cronjob # ohne parameter wird auf true geprueft https://www.buildahomelab.com/2018/11/12/using-ansible-when-statements/
|
|
ansible.builtin.cron:
|
|
name: MAILTO
|
|
env: yes
|
|
job: "{{ empfaenger_mail }}"
|
|
notify:
|
|
- postfix_testmail
|
|
|
|
- name: Mail Cronjob - Entfernen
|
|
become: yes
|
|
when: not postfix_mail_nach_cronjob
|
|
ansible.builtin.cron:
|
|
name: MAILTO
|
|
env: yes
|
|
job: ""
|