Skip to content
Snippets Groups Projects
Commit 99af5318 authored by Christian Elberfeld's avatar Christian Elberfeld
Browse files

upgrade festigkeit und logrotate configs

parent 3d619489
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,17 @@ ...@@ -12,6 +12,17 @@
- { path: "{{ basedir }}/secrets/mailman_restapi_pass", length: 28 } - { path: "{{ basedir }}/secrets/mailman_restapi_pass", length: 28 }
- name: pakete installieren
apt:
pkg: "{{ item }}"
update_cache: no
state: present
with_items:
- git
- logrotate
- openssl
- name: "create folder struct for {{ servicename }}" - name: "create folder struct for {{ servicename }}"
file: file:
path: "{{ item }}" path: "{{ item }}"
...@@ -49,6 +60,19 @@ ...@@ -49,6 +60,19 @@
- "{{ basedir }}/data/vmail-index" - "{{ basedir }}/data/vmail-index"
- name: check if git dir exists
stat:
path: "{{ basedir }}/mailcow-dockerized/.git"
register: mailcow_dotgit
- name: revert main.cf to avoid local changes
command: "git checkout data/conf/postfix/main.cf"
args:
chdir: "{{ basedir }}/mailcow-dockerized"
when: mailcow_dotgit.stat.exists == True
- name: Git checkout mailcow - name: Git checkout mailcow
git: git:
repo: 'https://github.com/mailcow/mailcow-dockerized.git' repo: 'https://github.com/mailcow/mailcow-dockerized.git'
...@@ -56,6 +80,7 @@ ...@@ -56,6 +80,7 @@
version: 58cce74bc9b76c47bb62f845af830f52f0976a5a version: 58cce74bc9b76c47bb62f845af830f52f0976a5a
# current version 2020-11-13 # current version 2020-11-13
- name: Git checkout mailman-dockerized - name: Git checkout mailman-dockerized
git: git:
repo: 'https://github.com/maxking/docker-mailman.git' repo: 'https://github.com/maxking/docker-mailman.git'
...@@ -64,7 +89,6 @@ ...@@ -64,7 +89,6 @@
# current version 2020-11-15 # current version 2020-11-15
- name: "create folder struct for {{ servicename }} 3" - name: "create folder struct for {{ servicename }} 3"
file: file:
path: "{{ item }}" path: "{{ item }}"
...@@ -72,7 +96,7 @@ ...@@ -72,7 +96,7 @@
with_items: with_items:
- "{{ basedir }}/mailcow-dockerized/data/assets/ssl/" - "{{ basedir }}/mailcow-dockerized/data/assets/ssl/"
# DH Parameter erzeugen
- name: check if DH Params exists - name: check if DH Params exists
stat: stat:
path: "{{ basedir }}/mailcow-dockerized/data/assets/ssl/dhparams.pem" path: "{{ basedir }}/mailcow-dockerized/data/assets/ssl/dhparams.pem"
...@@ -83,8 +107,7 @@ ...@@ -83,8 +107,7 @@
when: dhparams.stat.exists == False when: dhparams.stat.exists == False
# Copy mailcow config files - name: deploy mailcow config files
- name: deploy mailcow config
template: template:
dest: "{{ basedir }}/{{ item }}" dest: "{{ basedir }}/{{ item }}"
src: "{{ item }}" src: "{{ item }}"
...@@ -96,8 +119,7 @@ ...@@ -96,8 +119,7 @@
register: config_mailcow register: config_mailcow
# Copy mailman config files - name: deploy mailman config files
- name: deploy mailman config
template: template:
dest: "{{ basedir }}/{{ item }}" dest: "{{ basedir }}/{{ item }}"
src: "{{ item }}" src: "{{ item }}"
...@@ -110,6 +132,14 @@ ...@@ -110,6 +132,14 @@
register: config_mailman register: config_mailman
- name: deploy LogRotate configs
template:
src: "logrotate/{{item}}"
dest: "/etc/logrotate.d/{{item}}"
with_items:
- mailman-core
- mailman-web
# # Start mailcow containers # # Start mailcow containers
# - name: "stop {{ servicename }} (mailcow) docker" # - name: "stop {{ servicename }} (mailcow) docker"
# docker_compose: # docker_compose:
......
/srv/mail/data/mailman-core/var/logs/*.log {
rotate 12
monthly
compress
missingok
notifempty
}
/srv/mail/data/mailman-web/logs/*.log {
rotate 12
monthly
compress
missingok
notifempty
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment