From 67bd15b5cfd81e5893442fe8b1dcee3887c13bc7 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 3 Jan 2024 20:17:55 +0100 Subject: [PATCH] Implemented common docker routine --- group_vars/all | 5 +++-- roles/docker-akaunting/meta/main.yml | 2 -- roles/docker-akaunting/tasks/main.yml | 9 ++------- roles/docker-attendize/meta/main.yml | 2 -- roles/docker-attendize/tasks/main.yml | 9 ++------- roles/docker-baserow/meta/main.yml | 2 -- roles/docker-baserow/tasks/main.yml | 9 ++------- roles/docker-bigbluebutton/meta/main.yml | 2 -- roles/docker-bigbluebutton/tasks/main.yml | 7 +++++++ roles/docker-discourse/meta/main.yml | 2 -- roles/docker-discourse/tasks/main.yml | 9 ++------- roles/docker-funkwhale/meta/main.yml | 2 -- roles/docker-funkwhale/tasks/main.yml | 9 ++------- roles/docker-gitea/meta/main.yml | 2 -- roles/docker-gitea/tasks/main.yml | 9 ++------- roles/docker-gitlab/meta/main.yml | 2 -- roles/docker-gitlab/tasks/main.yml | 9 ++------- roles/docker-joomla/meta/main.yml | 2 -- roles/docker-joomla/tasks/main.yml | 9 ++------- roles/docker-listmonk/meta/main.yml | 2 -- roles/docker-listmonk/tasks/main.yml | 9 ++------- roles/docker-mailu/meta/main.yml | 1 - roles/docker-mailu/tasks/main.yml | 9 ++------- roles/docker-mastodon/meta/main.yml | 2 -- roles/docker-mastodon/tasks/main.yml | 9 ++------- roles/docker-matomo/meta/main.yml | 2 -- roles/docker-matomo/tasks/main.yml | 9 ++------- roles/docker-matrix-compose/meta/main.yml | 2 -- roles/docker-matrix-compose/tasks/main.yml | 9 ++------- roles/docker-mediawiki/tasks/main.yml | 6 +++--- roles/docker-mybb/meta/main.yml | 2 -- roles/docker-mybb/tasks/main.yml | 9 ++------- roles/docker-nextcloud/meta/main.yml | 2 -- roles/docker-nextcloud/tasks/main.yml | 9 ++------- roles/docker-openproject/meta/main.yml | 2 -- roles/docker-openproject/tasks/main.yml | 9 ++------- roles/docker-peertube/meta/main.yml | 2 -- roles/docker-peertube/tasks/main.yml | 11 +++-------- roles/docker-pixelfed/meta/main.yml | 2 -- roles/docker-pixelfed/tasks/main.yml | 9 ++------- roles/docker-wordpress/meta/main.yml | 2 -- roles/docker-wordpress/tasks/main.yml | 11 +++-------- roles/docker-yourls/tasks/main.yml | 13 ++----------- tasks/docker-compose-common.yml | 11 +++++++++++ 44 files changed, 66 insertions(+), 190 deletions(-) delete mode 100644 roles/docker-akaunting/meta/main.yml delete mode 100644 roles/docker-attendize/meta/main.yml delete mode 100644 roles/docker-baserow/meta/main.yml delete mode 100644 roles/docker-bigbluebutton/meta/main.yml delete mode 100644 roles/docker-discourse/meta/main.yml delete mode 100644 roles/docker-funkwhale/meta/main.yml delete mode 100644 roles/docker-gitea/meta/main.yml delete mode 100644 roles/docker-gitlab/meta/main.yml delete mode 100644 roles/docker-joomla/meta/main.yml delete mode 100644 roles/docker-listmonk/meta/main.yml delete mode 100644 roles/docker-mastodon/meta/main.yml delete mode 100644 roles/docker-matomo/meta/main.yml delete mode 100644 roles/docker-matrix-compose/meta/main.yml delete mode 100644 roles/docker-mybb/meta/main.yml delete mode 100644 roles/docker-nextcloud/meta/main.yml delete mode 100644 roles/docker-openproject/meta/main.yml delete mode 100644 roles/docker-peertube/meta/main.yml delete mode 100644 roles/docker-pixelfed/meta/main.yml delete mode 100644 roles/docker-wordpress/meta/main.yml create mode 100644 tasks/docker-compose-common.yml diff --git a/group_vars/all b/group_vars/all index bc9663e2..945afa6b 100644 --- a/group_vars/all +++ b/group_vars/all @@ -1,6 +1,7 @@ # General -verbose: false # Prints well formated debug information -top_domain: "localhost" +verbose: false # Prints well formated debug information +top_domain: "localhost" +backups_folder_path: "/Backups/" # Server Tact Variables diff --git a/roles/docker-akaunting/meta/main.yml b/roles/docker-akaunting/meta/main.yml deleted file mode 100644 index ec2a6059..00000000 --- a/roles/docker-akaunting/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose \ No newline at end of file diff --git a/roles/docker-akaunting/tasks/main.yml b/roles/docker-akaunting/tasks/main.yml index a2dc4a22..06e46d21 100644 --- a/roles/docker-akaunting/tasks/main.yml +++ b/roles/docker-akaunting/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-attendize/meta/main.yml b/roles/docker-attendize/meta/main.yml deleted file mode 100644 index ec2a6059..00000000 --- a/roles/docker-attendize/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose \ No newline at end of file diff --git a/roles/docker-attendize/tasks/main.yml b/roles/docker-attendize/tasks/main.yml index b223ae77..7fea90b4 100644 --- a/roles/docker-attendize/tasks/main.yml +++ b/roles/docker-attendize/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: receive {{ mail_interface_domain }} certificate command: certbot certonly --agree-tos --email {{ administrator_email }} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{ mail_interface_domain }} diff --git a/roles/docker-baserow/meta/main.yml b/roles/docker-baserow/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-baserow/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-baserow/tasks/main.yml b/roles/docker-baserow/tasks/main.yml index 014b690d..ef07660e 100644 --- a/roles/docker-baserow/tasks/main.yml +++ b/roles/docker-baserow/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-bigbluebutton/meta/main.yml b/roles/docker-bigbluebutton/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-bigbluebutton/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-bigbluebutton/tasks/main.yml b/roles/docker-bigbluebutton/tasks/main.yml index be8bfff7..c25d6052 100644 --- a/roles/docker-bigbluebutton/tasks/main.yml +++ b/roles/docker-bigbluebutton/tasks/main.yml @@ -1,4 +1,11 @@ --- +- name: include docker vars + include_vars: vars/docker-database-service.yml.j2 + +- name: load docker compose dependencies + include_role: + name: docker-compose + - name: "include task certbot-matomo.yml" include_tasks: certbot-matomo.yml diff --git a/roles/docker-discourse/meta/main.yml b/roles/docker-discourse/meta/main.yml deleted file mode 100644 index d3606e63..00000000 --- a/roles/docker-discourse/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- nginx-docker-reverse-proxy diff --git a/roles/docker-discourse/tasks/main.yml b/roles/docker-discourse/tasks/main.yml index ba8ad2c7..43988d9f 100644 --- a/roles/docker-discourse/tasks/main.yml +++ b/roles/docker-discourse/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-funkwhale/meta/main.yml b/roles/docker-funkwhale/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-funkwhale/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-funkwhale/tasks/main.yml b/roles/docker-funkwhale/tasks/main.yml index 59923d32..27b3c728 100644 --- a/roles/docker-funkwhale/tasks/main.yml +++ b/roles/docker-funkwhale/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-gitea/meta/main.yml b/roles/docker-gitea/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-gitea/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-gitea/tasks/main.yml b/roles/docker-gitea/tasks/main.yml index 24849a0a..a0266bb3 100644 --- a/roles/docker-gitea/tasks/main.yml +++ b/roles/docker-gitea/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-gitlab/meta/main.yml b/roles/docker-gitlab/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-gitlab/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-gitlab/tasks/main.yml b/roles/docker-gitlab/tasks/main.yml index 24849a0a..a0266bb3 100644 --- a/roles/docker-gitlab/tasks/main.yml +++ b/roles/docker-gitlab/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-joomla/meta/main.yml b/roles/docker-joomla/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-joomla/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-joomla/tasks/main.yml b/roles/docker-joomla/tasks/main.yml index 82221967..d2ca459f 100644 --- a/roles/docker-joomla/tasks/main.yml +++ b/roles/docker-joomla/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-listmonk/meta/main.yml b/roles/docker-listmonk/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-listmonk/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-listmonk/tasks/main.yml b/roles/docker-listmonk/tasks/main.yml index e1321ee8..66a0413b 100644 --- a/roles/docker-listmonk/tasks/main.yml +++ b/roles/docker-listmonk/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-mailu/meta/main.yml b/roles/docker-mailu/meta/main.yml index 1240088e..12fe7062 100644 --- a/roles/docker-mailu/meta/main.yml +++ b/roles/docker-mailu/meta/main.yml @@ -1,3 +1,2 @@ dependencies: -- docker-compose - systemd-notifier diff --git a/roles/docker-mailu/tasks/main.yml b/roles/docker-mailu/tasks/main.yml index 6da02317..27a2632a 100644 --- a/roles/docker-mailu/tasks/main.yml +++ b/roles/docker-mailu/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-mastodon/meta/main.yml b/roles/docker-mastodon/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-mastodon/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-mastodon/tasks/main.yml b/roles/docker-mastodon/tasks/main.yml index 91fe0f8d..8ed0107e 100644 --- a/roles/docker-mastodon/tasks/main.yml +++ b/roles/docker-mastodon/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include create-domains.yml" include_tasks: create-domains.yml diff --git a/roles/docker-matomo/meta/main.yml b/roles/docker-matomo/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-matomo/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-matomo/tasks/main.yml b/roles/docker-matomo/tasks/main.yml index c3181163..456bb47c 100644 --- a/roles/docker-matomo/tasks/main.yml +++ b/roles/docker-matomo/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-matrix-compose/meta/main.yml b/roles/docker-matrix-compose/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-matrix-compose/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-matrix-compose/tasks/main.yml b/roles/docker-matrix-compose/tasks/main.yml index 6fd4b598..a47090d1 100644 --- a/roles/docker-matrix-compose/tasks/main.yml +++ b/roles/docker-matrix-compose/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-mediawiki/tasks/main.yml b/roles/docker-mediawiki/tasks/main.yml index 33dbe7a4..2f82b65c 100644 --- a/roles/docker-mediawiki/tasks/main.yml +++ b/roles/docker-mediawiki/tasks/main.yml @@ -20,10 +20,10 @@ image: mariadb environment: MYSQL_DATABASE: mediawiki - MYSQL_ROOT_PASSWORD: "{{mediawiki_mysql_user_password}}" + MYSQL_ROOT_PASSWORD: "{{mediawiki_database_password}}" MYSQL_USER: mediawiki - MYSQL_PASSWORD: "{{mediawiki_mysql_user_password}}" + MYSQL_PASSWORD: "{{mediawiki_database_password}}" MARIADB_AUTO_UPGRADE: "1" volumes: - - mediawiki-database:/var/lib/mysql + - database:/var/lib/mysql restart: always diff --git a/roles/docker-mybb/meta/main.yml b/roles/docker-mybb/meta/main.yml deleted file mode 100644 index ec2a6059..00000000 --- a/roles/docker-mybb/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose \ No newline at end of file diff --git a/roles/docker-mybb/tasks/main.yml b/roles/docker-mybb/tasks/main.yml index 7bf9aa24..26b69b16 100644 --- a/roles/docker-mybb/tasks/main.yml +++ b/roles/docker-mybb/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks create-proxy-with-domain-replace.yml" include_tasks: create-proxy-with-domain-replace.yml diff --git a/roles/docker-nextcloud/meta/main.yml b/roles/docker-nextcloud/meta/main.yml deleted file mode 100644 index ec2a6059..00000000 --- a/roles/docker-nextcloud/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose \ No newline at end of file diff --git a/roles/docker-nextcloud/tasks/main.yml b/roles/docker-nextcloud/tasks/main.yml index eca8f058..e9a0eba5 100644 --- a/roles/docker-nextcloud/tasks/main.yml +++ b/roles/docker-nextcloud/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include task certbot-matomo.yml" include_tasks: certbot-matomo.yml diff --git a/roles/docker-openproject/meta/main.yml b/roles/docker-openproject/meta/main.yml deleted file mode 100644 index ec2a6059..00000000 --- a/roles/docker-openproject/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose \ No newline at end of file diff --git a/roles/docker-openproject/tasks/main.yml b/roles/docker-openproject/tasks/main.yml index 486446de..b2c4d340 100644 --- a/roles/docker-openproject/tasks/main.yml +++ b/roles/docker-openproject/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-peertube/meta/main.yml b/roles/docker-peertube/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-peertube/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-peertube/tasks/main.yml b/roles/docker-peertube/tasks/main.yml index 9ec5b724..34a8fc76 100644 --- a/roles/docker-peertube/tasks/main.yml +++ b/roles/docker-peertube/tasks/main.yml @@ -1,12 +1,7 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool - +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml + - name: "include create-domains.yml" include_tasks: create-domains.yml loop: "{{ domains }}" diff --git a/roles/docker-pixelfed/meta/main.yml b/roles/docker-pixelfed/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-pixelfed/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-pixelfed/tasks/main.yml b/roles/docker-pixelfed/tasks/main.yml index 014b690d..ef07660e 100644 --- a/roles/docker-pixelfed/tasks/main.yml +++ b/roles/docker-pixelfed/tasks/main.yml @@ -1,11 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/roles/docker-wordpress/meta/main.yml b/roles/docker-wordpress/meta/main.yml deleted file mode 100644 index 03045ca5..00000000 --- a/roles/docker-wordpress/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: -- docker-compose diff --git a/roles/docker-wordpress/tasks/main.yml b/roles/docker-wordpress/tasks/main.yml index 81ded561..2ab503cc 100644 --- a/roles/docker-wordpress/tasks/main.yml +++ b/roles/docker-wordpress/tasks/main.yml @@ -1,12 +1,7 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool - +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml + - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml loop: "{{ domains }}" diff --git a/roles/docker-yourls/tasks/main.yml b/roles/docker-yourls/tasks/main.yml index 56b0bf8e..456bb47c 100644 --- a/roles/docker-yourls/tasks/main.yml +++ b/roles/docker-yourls/tasks/main.yml @@ -1,15 +1,6 @@ --- -- name: include docker vars - include_vars: vars/docker-database-service.yml.j2 - -- name: load docker compose dependencies - include_role: - name: docker-compose - -- name: create central database - include_role: - name: docker-{{database_type}} - when: enable_central_database | bool +- name: "include docker-compose-common.yml" + include_tasks: docker-compose-common.yml - name: "include tasks nginx-docker-proxy-domain.yml" include_tasks: nginx-docker-proxy-domain.yml diff --git a/tasks/docker-compose-common.yml b/tasks/docker-compose-common.yml new file mode 100644 index 00000000..2028d40f --- /dev/null +++ b/tasks/docker-compose-common.yml @@ -0,0 +1,11 @@ +- name: include docker vars + include_vars: vars/docker-database-service.yml.j2 + +- name: load docker compose dependencies + include_role: + name: docker-compose + +- name: create central database + include_role: + name: docker-{{database_type}} + when: enable_central_database | bool \ No newline at end of file