computer-playbook/roles/docker-mailu/tasks/main.yml

29 lines
675 B
YAML

---
- name: configure {{domain}}.conf
template: src=domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx
- name: "Create mailu dir"
file:
path: "/mailu"
state: directory
mode: 0755
- name: "Add docker-compose.yml"
copy:
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/docker-compose.yml"
dest: "/mailu/docker-compose.yml"
- name: "Add mailu.env"
copy:
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/mailu.env"
dest: "/mailu/mailu.env"
- name: "Install mailu service"
copy:
src: "mailu.service"
dest: "/etc/systemd/system/mailu.service"
notify:
- "Restart Mailu"