mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-25 22:21:04 +01:00
Implemented role docker-mailu
This commit is contained in:
parent
810a56b39d
commit
46837c3eff
13
roles/docker-mailu/Readme.md
Normal file
13
roles/docker-mailu/Readme.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# role docker-mailu
|
||||||
|
|
||||||
|
Keep in mind to change the conflicting ports manual.
|
||||||
|
Execute
|
||||||
|
|
||||||
|
```bash
|
||||||
|
netstat -tulpn
|
||||||
|
```
|
||||||
|
to verify that there aren't port conflicts
|
||||||
|
|
||||||
|
## See
|
||||||
|
- https://gist.github.com/marienfressinaud/f284a59b18aad395eb0de2d22836ae6b
|
||||||
|
- https://mailu.io/1.7/compose/setup.html
|
12
roles/docker-mailu/files/mailu.service
Normal file
12
roles/docker-mailu/files/mailu.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mailu service
|
||||||
|
After=network.target docker.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/mailu
|
||||||
|
ExecStart=/usr/local/bin/docker-compose up
|
||||||
|
ExecStop=/usr/local/bin/docker-compose down
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
8
roles/docker-mailu/handlers/main.yml
Normal file
8
roles/docker-mailu/handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
- name: "Restart Mailu"
|
||||||
|
systemd:
|
||||||
|
name: mailu
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
||||||
|
daemon_reload: yes
|
||||||
|
become: yes
|
30
roles/docker-mailu/tasks/main.yml
Normal file
30
roles/docker-mailu/tasks/main.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
- name: "Create mailu dir"
|
||||||
|
file:
|
||||||
|
path: "/mailu"
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: "Add docker-compose.yml"
|
||||||
|
copy:
|
||||||
|
src: "docker-compose.yml"
|
||||||
|
dest: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/docker-compose.yml"
|
||||||
|
force: no
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: "Add mailu.env"
|
||||||
|
copy:
|
||||||
|
src: "mailu.env"
|
||||||
|
dest: "{{ inventory_dir }}/files/{{ inventory_hostname }}/mailu/mailu.env"
|
||||||
|
force: no
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: "Install mailu service"
|
||||||
|
copy:
|
||||||
|
src: "mailu.service"
|
||||||
|
dest: "/etc/systemd/system/mailu.service"
|
||||||
|
become: yes
|
||||||
|
notify:
|
||||||
|
- "Restart Mailu"
|
2
roles/native-mailserver/Readme.md
Normal file
2
roles/native-mailserver/Readme.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# role native-mailserver
|
||||||
|
This role is not implemented yet. For further information check: https://www.netarky.com/programming/arch_linux/Arch_Linux_mail_server_setup_1.html
|
Loading…
Reference in New Issue
Block a user