36 lines
656 B
YAML
36 lines
656 B
YAML
---
|
|
- hosts: teier.eu
|
|
gather_facts: no
|
|
tasks:
|
|
- name: Check dc directory
|
|
stat:
|
|
path: /dc/mail
|
|
register: mail_dc_dir_stat
|
|
|
|
- name: Create mail dc directory
|
|
file:
|
|
path: /dc/mail
|
|
state: directory
|
|
mode: 0755
|
|
group: root
|
|
owner: root
|
|
when: mail_dc_dir_stat.islnk is not defined
|
|
|
|
- name: Copy mailserver.env
|
|
copy:
|
|
src: mailserver.env
|
|
dest: /dc/mail/
|
|
|
|
- name: Copy setup.sh
|
|
copy:
|
|
src: setup.sh
|
|
dest: /dc/mail/
|
|
|
|
- name: Copy compose file
|
|
copy:
|
|
src: docker-compose.yml
|
|
dest: /dc/mail/
|
|
|
|
- name: Start mail
|
|
shell: "cd /dc/mail && docker-compose up -d"
|
|
|