15d783de86
* template --> ansible.builtin.template * apt --> ansible.builtin.apt * lineinfile --> ansible.builtin.lineinfile * file --> ansible.builtin.file * blockinfile --> ansible.builtin.blockinfile * cron --> ansible.builtin.cron * timezone --> ansible.builtin.timezone * get_url --> ansible.builtin.get_url * group --> ansible.builtin.group * user --> ansible.builtin.user * unarchive --> ansible.builtin.unarchive * service --> ansible.builtin.service * apache2_module --> ansible.builtin.apache2_module * package --> ansible.builtin.apt * template --> ansible.builtin.template 2
47 lines
1.2 KiB
YAML
47 lines
1.2 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.apt:
|
|
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:
|
|
- create_db_passwordfile
|
|
- 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: 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 mail_nach_cronjob
|
|
ansible.builtin.cron:
|
|
name: MAILTO
|
|
env: yes
|
|
job: ""
|