ansible/roles/re2o-service-mail/tasks/main.yml
2021-02-06 12:54:00 +01:00

43 lines
1 KiB
YAML

---
- 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