From d10137a0021952a2a367c86cd8a24a4d5ed247f0 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 5 Dec 2023 18:45:26 +0100 Subject: [PATCH] Refactored use of variables --- roles/docker-akaunting/README.md | 2 +- roles/docker-akaunting/handlers/main.yml | 2 +- roles/docker-akaunting/tasks/main.yml | 16 ++++++++-------- roles/docker-akaunting/vars/main.yml | 2 +- roles/docker-attendize/tasks/main.yml | 12 ++++++------ roles/docker-attendize/vars/main.yml | 2 +- roles/docker-baserow/tasks/main.yml | 8 ++++---- roles/docker-baserow/vars/main.yml | 2 +- roles/docker-bigbluebutton/handlers/main.yml | 4 ++-- roles/docker-bigbluebutton/tasks/main.yml | 4 ++-- roles/docker-bigbluebutton/vars/main.yml | 2 +- roles/docker-funkwhale/handlers/main.yml | 2 +- roles/docker-funkwhale/tasks/main.yml | 8 ++++---- roles/docker-funkwhale/vars/main.yml | 2 +- roles/docker-gitea/README.md | 4 ++-- roles/docker-gitea/handlers/main.yml | 2 +- roles/docker-gitea/tasks/main.yml | 6 +++--- roles/docker-gitea/vars/main.yml | 2 +- roles/docker-joomla/handlers/main.yml | 2 +- roles/docker-joomla/tasks/main.yml | 6 +++--- roles/docker-joomla/vars/main.yml | 2 +- roles/docker-listmonk/tasks/main.yml | 8 ++++---- roles/docker-listmonk/vars/main.yml | 2 +- roles/docker-mailu/handlers/main.yml | 2 +- roles/docker-mailu/tasks/main.yml | 4 ++-- .../templates/deploy-letsencrypt-mailu.sh.j2 | 2 +- roles/docker-mailu/vars/main.yml | 2 +- roles/docker-mastodon/handlers/main.yml | 2 +- roles/docker-mastodon/tasks/main.yml | 8 ++++---- roles/docker-mastodon/vars/main.yml | 2 +- roles/docker-matomo/handlers/main.yml | 2 +- roles/docker-matomo/tasks/main.yml | 6 +++--- roles/docker-matomo/vars/main.yml | 2 ++ roles/docker-nextcloud/handlers/main.yml | 2 +- roles/docker-nextcloud/tasks/main.yml | 6 +++--- roles/docker-nextcloud/vars/main.yml | 2 ++ roles/docker-peertube/handlers/main.yml | 2 +- roles/docker-peertube/tasks/main.yml | 8 ++++---- roles/docker-peertube/vars/main.yml | 2 +- roles/docker-pixelfed/tasks/main.yml | 8 ++++---- roles/docker-pixelfed/vars/main.yml | 2 +- roles/docker-roulette-wheel/handlers/main.yml | 2 +- roles/docker-roulette-wheel/tasks/main.yml | 8 ++++---- roles/docker-roulette-wheel/vars/main.yml | 2 +- roles/docker-wordpress/handlers/main.yml | 4 ++-- roles/docker-wordpress/tasks/main.yml | 16 ++++++++-------- roles/docker-wordpress/vars/main.yml | 2 +- roles/docker-yourls/handlers/main.yml | 2 +- roles/docker-yourls/tasks/main.yml | 6 +++--- roles/docker-yourls/vars/main.yml | 1 + 50 files changed, 107 insertions(+), 102 deletions(-) create mode 100644 roles/docker-matomo/vars/main.yml create mode 100644 roles/docker-nextcloud/vars/main.yml create mode 100644 roles/docker-yourls/vars/main.yml diff --git a/roles/docker-akaunting/README.md b/roles/docker-akaunting/README.md index 8613a55a..0ceecc90 100644 --- a/roles/docker-akaunting/README.md +++ b/roles/docker-akaunting/README.md @@ -81,7 +81,7 @@ Detailed steps for backing up your Akaunting instance, including setting manual ### Setting Variables Variables are crucial in configuring your Akaunting setup. Ensure you set the following variables correctly in your environment: -- `docker_compose_akaunting_path`: Set this variable to the path where your Docker Compose files for Akaunting are located. +- `docker_compose_instance_directory`: Set this variable to the path where your Docker Compose files for Akaunting are located. - `akaunting_db_password`, `akaunting_version`, `akaunting_company_name`, `akaunting_company_email`, `akaunting_setup_admin_email`, and `akaunting_setup_admin_password`: These should be set in your `.env` files as per your requirements. ### Additional Configuration diff --git a/roles/docker-akaunting/handlers/main.yml b/roles/docker-akaunting/handlers/main.yml index 03d6e54f..60c283cd 100644 --- a/roles/docker-akaunting/handlers/main.yml +++ b/roles/docker-akaunting/handlers/main.yml @@ -2,7 +2,7 @@ - name: setup akaunting command: cmd: docker-compose -p akaunting up -d --force-recreate - chdir: "{{docker_compose_akaunting_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: #AKAUNTING_SETUP: true COMPOSE_HTTP_TIMEOUT: 600 diff --git a/roles/docker-akaunting/tasks/main.yml b/roles/docker-akaunting/tasks/main.yml index 4537a21a..49f91540 100644 --- a/roles/docker-akaunting/tasks/main.yml +++ b/roles/docker-akaunting/tasks/main.yml @@ -8,20 +8,20 @@ - name: register directory stat: - path: "{{docker_compose_akaunting_path}}" - register: docker_compose_akaunting_path_register + path: "{{docker_compose_instance_directory}}" + register: docker_compose_instance_directory_register - name: checkout repository ansible.builtin.shell: git checkout . become: true args: - chdir: "{{docker_compose_akaunting_path}}" - when: docker_compose_akaunting_path_register.stat.exists + chdir: "{{docker_compose_instance_directory}}" + when: docker_compose_instance_directory_register.stat.exists - name: pull docker repository git: repo: "https://github.com/akaunting/docker.git" - dest: "{{docker_compose_akaunting_path}}" + dest: "{{docker_compose_instance_directory}}" update: yes notify: setup akaunting become: true @@ -37,12 +37,12 @@ ansible.builtin.shell: find . -type f -exec sed -i 's/akaunting:latest/akaunting:{{akaunting_version}}/' {} + && find . -type f -exec sed -i 's/version=latest/version={{akaunting_version}}/' {} + become: true args: - chdir: "{{docker_compose_akaunting_path}}" + chdir: "{{docker_compose_instance_directory}}" - name: configure db.env - template: src=db.env.j2 dest={{docker_compose_akaunting_path}}/env/db.env + template: src=db.env.j2 dest={{docker_compose_instance_directory}}/env/db.env notify: setup akaunting - name: configure run.env - template: src=run.env.j2 dest={{docker_compose_akaunting_path}}/env/run.env + template: src=run.env.j2 dest={{docker_compose_instance_directory}}/env/run.env notify: setup akaunting diff --git a/roles/docker-akaunting/vars/main.yml b/roles/docker-akaunting/vars/main.yml index d9e84148..6a272858 100644 --- a/roles/docker-akaunting/vars/main.yml +++ b/roles/docker-akaunting/vars/main.yml @@ -1 +1 @@ -docker_compose_akaunting_path: "{{path_docker_compose_files}}akaunting/" +docker_compose_instance_directory: "{{path_docker_compose_files}}akaunting/" diff --git a/roles/docker-attendize/tasks/main.yml b/roles/docker-attendize/tasks/main.yml index a2fe7b7c..83316140 100644 --- a/roles/docker-attendize/tasks/main.yml +++ b/roles/docker-attendize/tasks/main.yml @@ -22,20 +22,20 @@ - name: register directory stat: - path: "{{docker_compose_attendize_path}}" - register: docker_compose_attendize_path_register + path: "{{docker_compose_instance_directory}}" + register: docker_compose_instance_directory_register - name: checkout repository ansible.builtin.shell: git checkout . become: true args: - chdir: "{{docker_compose_attendize_path}}" - when: docker_compose_attendize_path_register.stat.exists + chdir: "{{docker_compose_instance_directory}}" + when: docker_compose_instance_directory_register.stat.exists - name: checkout Attendize repository ansible.builtin.git: repo: "https://github.com/Attendize/Attendize.git" - dest: "{{docker_compose_attendize_path}}" + dest: "{{docker_compose_instance_directory}}" version: master become: true @@ -47,5 +47,5 @@ - name: create docker-compose.yml file from template template: src: docker-compose.yml.j2 - dest: "{{docker_compose_attendize_path}}/docker-compose.yml" + dest: "{{docker_compose_instance_directory}}/docker-compose.yml" mode: 0644 \ No newline at end of file diff --git a/roles/docker-attendize/vars/main.yml b/roles/docker-attendize/vars/main.yml index fdbc1410..5645bf91 100644 --- a/roles/docker-attendize/vars/main.yml +++ b/roles/docker-attendize/vars/main.yml @@ -1,3 +1,3 @@ --- -docker_compose_attendize_path: "{{path_docker_compose_files}}attendize/" +docker_compose_instance_directory: "{{path_docker_compose_files}}attendize/" mail_interface_domain: "mail.{{domain}}" diff --git a/roles/docker-baserow/tasks/main.yml b/roles/docker-baserow/tasks/main.yml index 728f93f8..216da95a 100644 --- a/roles/docker-baserow/tasks/main.yml +++ b/roles/docker-baserow/tasks/main.yml @@ -6,20 +6,20 @@ template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{docker_compose_path}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{docker_compose_path}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml - template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate baserow - name: add env template: src: env.j2 - dest: "{{docker_compose_path}}env" + dest: "{{docker_compose_instance_directory}}env" mode: '770' force: yes notify: recreate baserow \ No newline at end of file diff --git a/roles/docker-baserow/vars/main.yml b/roles/docker-baserow/vars/main.yml index 4c6318d8..fbd997e8 100644 --- a/roles/docker-baserow/vars/main.yml +++ b/roles/docker-baserow/vars/main.yml @@ -1 +1 @@ -docker_compose_path: "{{path_docker_compose_files}}baserow/" \ No newline at end of file +docker_compose_instance_directory: "{{path_docker_compose_files}}baserow/" \ No newline at end of file diff --git a/roles/docker-bigbluebutton/handlers/main.yml b/roles/docker-bigbluebutton/handlers/main.yml index b4f67a90..0a22f4bd 100644 --- a/roles/docker-bigbluebutton/handlers/main.yml +++ b/roles/docker-bigbluebutton/handlers/main.yml @@ -2,7 +2,7 @@ - name: create docker-compose.yml for bigbluebutton command: cmd: bash ./scripts/generate-compose - chdir: "{{docker_compose_bigbluebutton_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 @@ -10,7 +10,7 @@ - name: docker compose up bigbluebutton command: cmd: docker-compose -p bigbluebutton up -d --force-recreate - chdir: "{{docker_compose_bigbluebutton_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-bigbluebutton/tasks/main.yml b/roles/docker-bigbluebutton/tasks/main.yml index 41b395b6..11c97a80 100644 --- a/roles/docker-bigbluebutton/tasks/main.yml +++ b/roles/docker-bigbluebutton/tasks/main.yml @@ -9,7 +9,7 @@ - name: pull docker repository git: repo: "https://github.com/bigbluebutton/docker.git" - dest: "{{docker_compose_bigbluebutton_path}}" + dest: "{{docker_compose_instance_directory}}" update: yes recursive: yes version: main @@ -23,5 +23,5 @@ when: git_result.failed - name: deploy .env - template: src=env.j2 dest={{docker_compose_bigbluebutton_path}}/.env + template: src=env.j2 dest={{docker_compose_instance_directory}}/.env notify: setup bigbluebutton diff --git a/roles/docker-bigbluebutton/vars/main.yml b/roles/docker-bigbluebutton/vars/main.yml index b6df9f22..7b1a7790 100644 --- a/roles/docker-bigbluebutton/vars/main.yml +++ b/roles/docker-bigbluebutton/vars/main.yml @@ -1 +1 @@ -docker_compose_bigbluebutton_path: "{{path_docker_compose_files}}bigbluebutton/" \ No newline at end of file +docker_compose_instance_directory: "{{path_docker_compose_files}}bigbluebutton/" \ No newline at end of file diff --git a/roles/docker-funkwhale/handlers/main.yml b/roles/docker-funkwhale/handlers/main.yml index 21fbb6b6..726f559e 100644 --- a/roles/docker-funkwhale/handlers/main.yml +++ b/roles/docker-funkwhale/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate funkwhale command: cmd: docker-compose -p funkwhale up -d --force-recreate - chdir: "{{docker_compose_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-funkwhale/tasks/main.yml b/roles/docker-funkwhale/tasks/main.yml index b9303812..e2eae661 100644 --- a/roles/docker-funkwhale/tasks/main.yml +++ b/roles/docker-funkwhale/tasks/main.yml @@ -6,20 +6,20 @@ template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{docker_compose_path}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{docker_compose_path}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml - template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate funkwhale - name: add .env template: src: env.j2 - dest: "{{docker_compose_path}}.env" + dest: "{{docker_compose_instance_directory}}.env" mode: '770' force: yes notify: recreate funkwhale \ No newline at end of file diff --git a/roles/docker-funkwhale/vars/main.yml b/roles/docker-funkwhale/vars/main.yml index 88dc822e..a04726fa 100644 --- a/roles/docker-funkwhale/vars/main.yml +++ b/roles/docker-funkwhale/vars/main.yml @@ -1,2 +1,2 @@ -docker_compose_path: "{{path_docker_compose_files}}funkwhale/" +docker_compose_instance_directory: "{{path_docker_compose_files}}funkwhale/" client_max_body_size: "512M" diff --git a/roles/docker-gitea/README.md b/roles/docker-gitea/README.md index be481000..54fe2c31 100644 --- a/roles/docker-gitea/README.md +++ b/roles/docker-gitea/README.md @@ -2,7 +2,7 @@ ## update ```bash -cd {{path_docker_compose_folder}} +cd {{docker_compose_instance_directory}} docker-compose down docker-compose pull docker-compose up -d @@ -17,7 +17,7 @@ Keep in mind to track and to don't interrupt the update process until the migrat ## recreate ```bash -cd {{path_docker_compose_folder}} && docker-compose -p gitea up -d --force-recreate +cd {{docker_compose_instance_directory}} && docker-compose -p gitea up -d --force-recreate ``` ## database access diff --git a/roles/docker-gitea/handlers/main.yml b/roles/docker-gitea/handlers/main.yml index 612b7b3b..ad7e1885 100644 --- a/roles/docker-gitea/handlers/main.yml +++ b/roles/docker-gitea/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate gitea command: cmd: docker-compose -p gitea up -d --force-recreate - chdir: "{{path_docker_compose_folder}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-gitea/tasks/main.yml b/roles/docker-gitea/tasks/main.yml index 84048467..c1f8761c 100644 --- a/roles/docker-gitea/tasks/main.yml +++ b/roles/docker-gitea/tasks/main.yml @@ -6,12 +6,12 @@ template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{path_docker_compose_folder}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{path_docker_compose_folder}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml - template: src=docker-compose.yml.j2 dest={{path_docker_compose_folder}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate gitea diff --git a/roles/docker-gitea/vars/main.yml b/roles/docker-gitea/vars/main.yml index 3ec603fc..bf380fda 100644 --- a/roles/docker-gitea/vars/main.yml +++ b/roles/docker-gitea/vars/main.yml @@ -1 +1 @@ -path_docker_compose_folder: "{{path_docker_compose_files}}gitea/" +docker_compose_instance_directory: "{{path_docker_compose_files}}gitea/" diff --git a/roles/docker-joomla/handlers/main.yml b/roles/docker-joomla/handlers/main.yml index a3578b38..36c1bc47 100644 --- a/roles/docker-joomla/handlers/main.yml +++ b/roles/docker-joomla/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate joomla command: cmd: docker-compose -p joomla up -d --force-recreate - chdir: "{{path_docker_compose_folder}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-joomla/tasks/main.yml b/roles/docker-joomla/tasks/main.yml index 8dc18a6e..ef524fcf 100644 --- a/roles/docker-joomla/tasks/main.yml +++ b/roles/docker-joomla/tasks/main.yml @@ -6,12 +6,12 @@ template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{path_docker_compose_folder}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{path_docker_compose_folder}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml - template: src=docker-compose.yml.j2 dest={{path_docker_compose_folder}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate joomla \ No newline at end of file diff --git a/roles/docker-joomla/vars/main.yml b/roles/docker-joomla/vars/main.yml index 00af7b89..5abb2051 100644 --- a/roles/docker-joomla/vars/main.yml +++ b/roles/docker-joomla/vars/main.yml @@ -1 +1 @@ -path_docker_compose_folder: "{{path_docker_compose_files}}joomla/" +docker_compose_instance_directory: "{{path_docker_compose_files}}joomla/" diff --git a/roles/docker-listmonk/tasks/main.yml b/roles/docker-listmonk/tasks/main.yml index eaf7eea6..5cfca8d3 100644 --- a/roles/docker-listmonk/tasks/main.yml +++ b/roles/docker-listmonk/tasks/main.yml @@ -8,20 +8,20 @@ dest: "/etc/nginx/conf.d/{{domain}}.conf" notify: restart nginx -- name: "create {{path_docker_compose_folder}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{path_docker_compose_folder}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml template: src: "docker-compose.yml.j2" - dest: "{{path_docker_compose_folder}}docker-compose.yml" + dest: "{{docker_compose_instance_directory}}docker-compose.yml" notify: recreate listmonk - name: add config.toml template: src: "config.toml.j2" - dest: "{{path_docker_compose_folder}}config.toml" + dest: "{{docker_compose_instance_directory}}config.toml" notify: recreate listmonk \ No newline at end of file diff --git a/roles/docker-listmonk/vars/main.yml b/roles/docker-listmonk/vars/main.yml index da09a09b..e1eb20aa 100644 --- a/roles/docker-listmonk/vars/main.yml +++ b/roles/docker-listmonk/vars/main.yml @@ -1 +1 @@ -path_docker_compose_folder: "{{path_docker_compose_files}}listmonk/" +docker_compose_instance_directory: "{{path_docker_compose_files}}listmonk/" diff --git a/roles/docker-mailu/handlers/main.yml b/roles/docker-mailu/handlers/main.yml index f7857c4a..28fdd5d3 100644 --- a/roles/docker-mailu/handlers/main.yml +++ b/roles/docker-mailu/handlers/main.yml @@ -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 diff --git a/roles/docker-mailu/tasks/main.yml b/roles/docker-mailu/tasks/main.yml index bd8dca4c..d3100934 100644 --- a/roles/docker-mailu/tasks/main.yml +++ b/roles/docker-mailu/tasks/main.yml @@ -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 diff --git a/roles/docker-mailu/templates/deploy-letsencrypt-mailu.sh.j2 b/roles/docker-mailu/templates/deploy-letsencrypt-mailu.sh.j2 index 34c1ce08..3a30c805 100644 --- a/roles/docker-mailu/templates/deploy-letsencrypt-mailu.sh.j2 +++ b/roles/docker-mailu/templates/deploy-letsencrypt-mailu.sh.j2 @@ -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 diff --git a/roles/docker-mailu/vars/main.yml b/roles/docker-mailu/vars/main.yml index 1989bbe9..11ff0ae1 100644 --- a/roles/docker-mailu/vars/main.yml +++ b/roles/docker-mailu/vars/main.yml @@ -1 +1 @@ -mailu_front_container_name: "mailu-front-1" +docker_compose_instance_directory: "{{path_docker_compose_files}}mailu/" \ No newline at end of file diff --git a/roles/docker-mastodon/handlers/main.yml b/roles/docker-mastodon/handlers/main.yml index a0b6b1e4..cfe2dcb4 100644 --- a/roles/docker-mastodon/handlers/main.yml +++ b/roles/docker-mastodon/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate mastodon command: cmd: docker-compose -p mastodon up -d --force-recreate - chdir: "{{docker_compose_mastodon_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-mastodon/tasks/main.yml b/roles/docker-mastodon/tasks/main.yml index b4b90a28..4c0ff52b 100644 --- a/roles/docker-mastodon/tasks/main.yml +++ b/roles/docker-mastodon/tasks/main.yml @@ -6,19 +6,19 @@ template: src=templates/mastodon.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{docker_compose_mastodon_path}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{docker_compose_mastodon_path}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: copy docker-compose.yml - template: src=docker-compose.yml.j2 dest={{docker_compose_mastodon_path}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate mastodon - name: copy configuration template: src: .env.production.j2 - dest: "{{docker_compose_mastodon_path}}.env.production" + dest: "{{docker_compose_instance_directory}}.env.production" force: no notify: recreate mastodon diff --git a/roles/docker-mastodon/vars/main.yml b/roles/docker-mastodon/vars/main.yml index bd18500a..31c78177 100644 --- a/roles/docker-mastodon/vars/main.yml +++ b/roles/docker-mastodon/vars/main.yml @@ -1 +1 @@ -docker_compose_mastodon_path: "{{path_docker_compose_files}}mastodon/" +docker_compose_instance_directory: "{{path_docker_compose_files}}mastodon/" diff --git a/roles/docker-matomo/handlers/main.yml b/roles/docker-matomo/handlers/main.yml index 09cddb78..65148936 100644 --- a/roles/docker-matomo/handlers/main.yml +++ b/roles/docker-matomo/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate matomo command: cmd: docker-compose -p matomo up -d --force-recreate - chdir: "{{path_docker_compose_files}}matomo/" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-matomo/tasks/main.yml b/roles/docker-matomo/tasks/main.yml index 706ff445..e35626ad 100644 --- a/roles/docker-matomo/tasks/main.yml +++ b/roles/docker-matomo/tasks/main.yml @@ -8,14 +8,14 @@ dest: "/etc/nginx/conf.d/{{domain}}.conf" notify: restart nginx -- name: "create {{path_docker_compose_files}}matomo/" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{path_docker_compose_files}}matomo/" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml template: src: "docker-compose.yml.j2" - dest: "{{path_docker_compose_files}}matomo/docker-compose.yml" + dest: "{{docker_compose_instance_directory}}docker-compose.yml" notify: recreate matomo diff --git a/roles/docker-matomo/vars/main.yml b/roles/docker-matomo/vars/main.yml new file mode 100644 index 00000000..1bf79ec3 --- /dev/null +++ b/roles/docker-matomo/vars/main.yml @@ -0,0 +1,2 @@ +--- +docker_compose_instance_directory: "{{path_docker_compose_files}}matomo/" \ No newline at end of file diff --git a/roles/docker-nextcloud/handlers/main.yml b/roles/docker-nextcloud/handlers/main.yml index bbfeec16..01aab9ef 100644 --- a/roles/docker-nextcloud/handlers/main.yml +++ b/roles/docker-nextcloud/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate nextcloud command: cmd: docker-compose -p nextcloud up -d --force-recreate - chdir: "{{path_docker_compose_files}}nextcloud/" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-nextcloud/tasks/main.yml b/roles/docker-nextcloud/tasks/main.yml index 7340a4bc..fc28225e 100644 --- a/roles/docker-nextcloud/tasks/main.yml +++ b/roles/docker-nextcloud/tasks/main.yml @@ -20,14 +20,14 @@ dest: "{{path_docker_volumes}}nextcloud/nginx.conf" notify: recreate nextcloud -- name: "create {{path_docker_compose_files}}nextcloud/" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{path_docker_compose_files}}nextcloud/" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml template: src: docker-compose.yml.j2 - dest: "{{path_docker_compose_files}}nextcloud/docker-compose.yml" + dest: "{{docker_compose_instance_directory}}docker-compose.yml" notify: recreate nextcloud diff --git a/roles/docker-nextcloud/vars/main.yml b/roles/docker-nextcloud/vars/main.yml new file mode 100644 index 00000000..603e4458 --- /dev/null +++ b/roles/docker-nextcloud/vars/main.yml @@ -0,0 +1,2 @@ +--- +docker_compose_instance_directory: "{{path_docker_compose_files}}nextcloud/" \ No newline at end of file diff --git a/roles/docker-peertube/handlers/main.yml b/roles/docker-peertube/handlers/main.yml index 6b935214..e5ece492 100644 --- a/roles/docker-peertube/handlers/main.yml +++ b/roles/docker-peertube/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate peertube command: cmd: docker-compose -p peertube up -d --force-recreate - chdir: "{{docker_compose_peertube_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-peertube/tasks/main.yml b/roles/docker-peertube/tasks/main.yml index 83b70026..15a07774 100644 --- a/roles/docker-peertube/tasks/main.yml +++ b/roles/docker-peertube/tasks/main.yml @@ -6,18 +6,18 @@ template: src=templates/peertube.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{docker_compose_peertube_path}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{docker_compose_peertube_path}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: copy docker-compose.yml - template: src=docker-compose.yml.j2 dest={{docker_compose_peertube_path}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate peertube - name: copy configuration template: src: env.j2 - dest: "{{docker_compose_peertube_path}}.env" + dest: "{{docker_compose_instance_directory}}.env" notify: recreate peertube diff --git a/roles/docker-peertube/vars/main.yml b/roles/docker-peertube/vars/main.yml index eed99e54..5c652012 100644 --- a/roles/docker-peertube/vars/main.yml +++ b/roles/docker-peertube/vars/main.yml @@ -1 +1 @@ -docker_compose_peertube_path: "{{path_docker_compose_files}}peertube/" +docker_compose_instance_directory: "{{path_docker_compose_files}}peertube/" diff --git a/roles/docker-pixelfed/tasks/main.yml b/roles/docker-pixelfed/tasks/main.yml index 76a96959..7ac3db74 100644 --- a/roles/docker-pixelfed/tasks/main.yml +++ b/roles/docker-pixelfed/tasks/main.yml @@ -6,20 +6,20 @@ template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{docker_compose_path}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{docker_compose_path}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml - template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate pixelfed - name: add env template: src: env.j2 - dest: "{{docker_compose_path}}env" + dest: "{{docker_compose_instance_directory}}env" mode: '770' force: yes notify: recreate pixelfed \ No newline at end of file diff --git a/roles/docker-pixelfed/vars/main.yml b/roles/docker-pixelfed/vars/main.yml index 75337cc1..64128963 100644 --- a/roles/docker-pixelfed/vars/main.yml +++ b/roles/docker-pixelfed/vars/main.yml @@ -1,2 +1,2 @@ -docker_compose_path: "{{path_docker_compose_files}}pixelfed/" +docker_compose_instance_directory: "{{path_docker_compose_files}}pixelfed/" client_max_body_size: "512M" diff --git a/roles/docker-roulette-wheel/handlers/main.yml b/roles/docker-roulette-wheel/handlers/main.yml index 96a4a963..c5bfc07b 100644 --- a/roles/docker-roulette-wheel/handlers/main.yml +++ b/roles/docker-roulette-wheel/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate and build roulette-wheel command: cmd: docker-compose -p roulette-wheel up -d --force-recreate --build - chdir: "{{docker_compose_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 \ No newline at end of file diff --git a/roles/docker-roulette-wheel/tasks/main.yml b/roles/docker-roulette-wheel/tasks/main.yml index a136b7d6..9741507f 100644 --- a/roles/docker-roulette-wheel/tasks/main.yml +++ b/roles/docker-roulette-wheel/tasks/main.yml @@ -6,9 +6,9 @@ template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf notify: restart nginx -- name: "create {{docker_compose_path}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{docker_compose_path}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 @@ -28,9 +28,9 @@ when: git_result.failed - name: add docker-compose.yml - template: src=docker-compose.yml.j2 dest={{docker_compose_path}}docker-compose.yml + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate and build roulette-wheel - name: add Dockerfile - template: src=Dockerfile.j2 dest={{docker_compose_path}}Dockerfile + template: src=Dockerfile.j2 dest={{docker_compose_instance_directory}}Dockerfile notify: recreate and build roulette-wheel diff --git a/roles/docker-roulette-wheel/vars/main.yml b/roles/docker-roulette-wheel/vars/main.yml index 6244653c..ab0e3aac 100644 --- a/roles/docker-roulette-wheel/vars/main.yml +++ b/roles/docker-roulette-wheel/vars/main.yml @@ -1,2 +1,2 @@ -docker_compose_path: "{{path_docker_compose_files}}roulette-wheel/" +docker_compose_instance_directory: "{{path_docker_compose_files}}roulette-wheel/" app_path: "{{path_docker_compose_files}}roulette-wheel/app/" \ No newline at end of file diff --git a/roles/docker-wordpress/handlers/main.yml b/roles/docker-wordpress/handlers/main.yml index 633214f3..284676cc 100644 --- a/roles/docker-wordpress/handlers/main.yml +++ b/roles/docker-wordpress/handlers/main.yml @@ -2,14 +2,14 @@ - name: rebuild wordpress container command: cmd: docker build --no-cache -t custom_wordpress . - chdir: "{{docker_compose_wordpress_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 - name: recreate wordpress command: cmd: docker-compose -p wordpress up -d --force-recreate - chdir: "{{docker_compose_wordpress_path}}" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 \ No newline at end of file diff --git a/roles/docker-wordpress/tasks/main.yml b/roles/docker-wordpress/tasks/main.yml index 838122ff..e0390e81 100644 --- a/roles/docker-wordpress/tasks/main.yml +++ b/roles/docker-wordpress/tasks/main.yml @@ -13,28 +13,28 @@ template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ domain }}.conf notify: restart nginx -- name: "create {{docker_compose_wordpress_path}}" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{docker_compose_wordpress_path}}" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 -- name: "Transfering upload.ini to {{docker_compose_wordpress_path}}" +- name: "Transfering upload.ini to {{docker_compose_instance_directory}}" template: src: upload.ini.j2 - dest: "{{docker_compose_wordpress_path}}upload.ini" + dest: "{{docker_compose_instance_directory}}upload.ini" notify: - recreate wordpress - rebuild wordpress container -- name: "Transfering Dockerfile to {{docker_compose_wordpress_path}}" +- name: "Transfering Dockerfile to {{docker_compose_instance_directory}}" copy: src: Dockerfile - dest: "{{docker_compose_wordpress_path}}Dockerfile" + dest: "{{docker_compose_instance_directory}}Dockerfile" notify: - recreate wordpress - rebuild wordpress container -- name: "add docker-compose.yml to {{docker_compose_wordpress_path}}" - template: src=docker-compose.yml.j2 dest={{docker_compose_wordpress_path}}docker-compose.yml +- name: "add docker-compose.yml to {{docker_compose_instance_directory}}" + template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: recreate wordpress diff --git a/roles/docker-wordpress/vars/main.yml b/roles/docker-wordpress/vars/main.yml index 9be75913..21e4e324 100644 --- a/roles/docker-wordpress/vars/main.yml +++ b/roles/docker-wordpress/vars/main.yml @@ -1,2 +1,2 @@ -docker_compose_wordpress_path: "{{path_docker_compose_files}}wordpress/" +docker_compose_instance_directory: "{{path_docker_compose_files}}wordpress/" wordpress_max_upload_size: "64M" diff --git a/roles/docker-yourls/handlers/main.yml b/roles/docker-yourls/handlers/main.yml index 37907a0f..1c11bee6 100644 --- a/roles/docker-yourls/handlers/main.yml +++ b/roles/docker-yourls/handlers/main.yml @@ -2,7 +2,7 @@ - name: recreate yourls command: cmd: docker-compose -p yourls up -d --force-recreate - chdir: "{{path_docker_compose_files}}yourls/" + chdir: "{{docker_compose_instance_directory}}" environment: COMPOSE_HTTP_TIMEOUT: 600 DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-yourls/tasks/main.yml b/roles/docker-yourls/tasks/main.yml index aebb66da..5f2d2bab 100644 --- a/roles/docker-yourls/tasks/main.yml +++ b/roles/docker-yourls/tasks/main.yml @@ -8,14 +8,14 @@ dest: "/etc/nginx/conf.d/{{domain}}.conf" notify: restart nginx -- name: "create {{path_docker_compose_files}}yourls/" +- name: "create {{docker_compose_instance_directory}}" file: - path: "{{path_docker_compose_files}}yourls/" + path: "{{docker_compose_instance_directory}}" state: directory mode: 0755 - name: add docker-compose.yml template: src: "docker-compose.yml.j2" - dest: "{{path_docker_compose_files}}yourls/docker-compose.yml" + dest: "{{docker_compose_instance_directory}}docker-compose.yml" notify: recreate yourls diff --git a/roles/docker-yourls/vars/main.yml b/roles/docker-yourls/vars/main.yml new file mode 100644 index 00000000..dbaf8c01 --- /dev/null +++ b/roles/docker-yourls/vars/main.yml @@ -0,0 +1 @@ +docker_compose_instance_directory: "{{path_docker_compose_files}}yourls/" \ No newline at end of file