Refactored use of variables

This commit is contained in:
2023-12-05 18:45:26 +01:00
parent 5ca94d6ecc
commit 3b06b5bcf4
50 changed files with 107 additions and 102 deletions

View File

@@ -2,7 +2,7 @@
- name: recreate mailu
command:
cmd: docker-compose -p mailu up -d --force-recreate
chdir: "{{path_docker_compose_files}}mailu/"
chdir: "{{docker_compose_instance_directory}}"
environment:
COMPOSE_HTTP_TIMEOUT: 900
DOCKER_CLIENT_TIMEOUT: 900

View File

@@ -36,13 +36,13 @@
- name: add docker-compose.yml
template:
src: "docker-compose.yml.j2"
dest: "{{path_docker_compose_files}}mailu/docker-compose.yml"
dest: "{{docker_compose_instance_directory}}docker-compose.yml"
notify: recreate mailu
- name: add mailu.env
template:
src: "mailu.env.j2"
dest: "{{path_docker_compose_files}}mailu/mailu.env"
dest: "{{docker_compose_instance_directory}}mailu.env"
notify: recreate mailu
- name: add deploy-letsencrypt-mailu.sh

View File

@@ -1,4 +1,4 @@
#!/bin/sh
cp /etc/letsencrypt/live/{{domain}}/privkey.pem /etc/mailu/certs/key.pem || exit 1
cp /etc/letsencrypt/live/{{domain}}/fullchain.pem /etc/mailu/certs/cert.pem || exit 1
docker exec {{mailu_front_container_name}} nginx -s reload
cd {{docker_compose_instance_directory}} && docker compose exec front nginx -s reload || exit 1

View File

@@ -1 +1 @@
mailu_front_container_name: "mailu-front-1"
docker_compose_instance_directory: "{{path_docker_compose_files}}mailu/"