Add re2o mail server
This commit is contained in:
parent
49243202b2
commit
3af1aa8a18
1 changed files with 43 additions and 0 deletions
43
roles/re2o-service-mail/tasks/main.yml
Normal file
43
roles/re2o-service-mail/tasks/main.yml
Normal file
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
- name: Create re2o mail-server directory
|
||||
file:
|
||||
path: /var/local/re2o-services/mail-server
|
||||
state: directory
|
||||
mode: '0775'
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Clone re2o mail-server repository
|
||||
git:
|
||||
repo: 'http://gitea.auro.re/aurore/re2o-mail-server.git'
|
||||
dest: /var/local/re2o-services/mail-server
|
||||
umask: '002'
|
||||
|
||||
- name: Add API configuration
|
||||
template:
|
||||
src: config.ini.j2
|
||||
dest: /var/local/re2o-services/mail-server/config.ini
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
|
||||
- name: Create generated directory
|
||||
file:
|
||||
path: /var/local/re2o-services/mail-server/generated
|
||||
state: directory
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Deploy cron for re2o-mail-server
|
||||
template:
|
||||
src: cron.d/re2o-services-mail-server.j2
|
||||
dest: /etc/cron.d/re2o-services-mail-server
|
||||
|
||||
- name: Deploy local aliases
|
||||
template:
|
||||
src: re2o-services/mail-server/mail-aliases/{{ item }}.j2
|
||||
dest: /var/local/re2o-services/mail-server/{{ item }}_local
|
||||
loop:
|
||||
- aliases
|
||||
- virtuals
|
Loading…
Reference in a new issue