[GIT] refactor submodules: add all to own repo
This commit is contained in:
commit
be2b9bf3c0
27 changed files with 3311 additions and 0 deletions
49
tasks/cronmails.yml
Normal file
49
tasks/cronmails.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
# Server/Cronmails: Setup Mails from Cronjobs (install exim)
|
||||
|
||||
# Install and configure exim
|
||||
- name: cronmails - Install exim4 as MTA
|
||||
become: yes
|
||||
apt:
|
||||
name: "{{ packages }}"
|
||||
state: latest
|
||||
vars:
|
||||
packages:
|
||||
- exim4
|
||||
- mailutils
|
||||
- name: cronmails - Create exim4 config folder
|
||||
become: yes
|
||||
file: path=/etc/exim4 state=directory
|
||||
- name: cronmails - Copy exim4 config template
|
||||
become: yes
|
||||
copy:
|
||||
src: "{{ role_path }}/files/exim4.conf.template"
|
||||
dest: /etc/exim4/exim4.conf.template
|
||||
- name: cronmails - Copy exim4 config file
|
||||
become: yes
|
||||
template:
|
||||
src: "{{ role_path }}/templates/update-exim4.conf.conf"
|
||||
dest: /etc/exim4/update-exim4.conf.conf
|
||||
- name: cronmails - Run update-exim4.conf
|
||||
become: yes
|
||||
shell: "update-exim4.conf"
|
||||
- name: cronmails - Enable and start exim4
|
||||
become: yes
|
||||
service:
|
||||
name: exim4
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
# Set crobjob env variables/ settings
|
||||
- name: cronmails - Crontab set path
|
||||
become: yes
|
||||
cron:
|
||||
name: PATH
|
||||
env: yes
|
||||
value: /bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
|
||||
- name: cronmails - Crontab set mailto
|
||||
become: yes
|
||||
cron:
|
||||
name: MAILTO
|
||||
env: yes
|
||||
value: "device-{{ ansible_hostname }}@jtbx.de"
|
||||
Loading…
Add table
Add a link
Reference in a new issue