From 2d56ff0afa20db03c339a8358ac181229e6f510a Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 13 Mar 2019 07:40:51 +0200 Subject: [PATCH] Skip some uninstall tasks if not necessary to run --- roles/matrix-corporal/tasks/setup_corporal.yml | 1 + roles/matrix-coturn/tasks/setup_coturn.yml | 1 + roles/matrix-mailer/tasks/setup_mailer.yml | 1 + roles/matrix-nginx-proxy/tasks/setup_nginx_proxy.yml | 1 + roles/matrix-riot-web/tasks/setup_riot_web.yml | 1 + roles/matrix-synapse/tasks/setup_synapse_goofys.yml | 1 + 6 files changed, 6 insertions(+) diff --git a/roles/matrix-corporal/tasks/setup_corporal.yml b/roles/matrix-corporal/tasks/setup_corporal.yml index 0bfba48a..816f05c1 100644 --- a/roles/matrix-corporal/tasks/setup_corporal.yml +++ b/roles/matrix-corporal/tasks/setup_corporal.yml @@ -51,6 +51,7 @@ stat: path: "/etc/systemd/system/matrix-corporal.service" register: matrix_corporal_service_stat + when: "not matrix_corporal_enabled" - name: Ensure matrix-corporal is stopped service: diff --git a/roles/matrix-coturn/tasks/setup_coturn.yml b/roles/matrix-coturn/tasks/setup_coturn.yml index 5dd0db41..6fd3ea72 100644 --- a/roles/matrix-coturn/tasks/setup_coturn.yml +++ b/roles/matrix-coturn/tasks/setup_coturn.yml @@ -58,6 +58,7 @@ stat: path: "/etc/systemd/system/matrix-coturn.service" register: matrix_coturn_service_stat + when: "not matrix_coturn_enabled" - name: Ensure matrix-coturn is stopped service: diff --git a/roles/matrix-mailer/tasks/setup_mailer.yml b/roles/matrix-mailer/tasks/setup_mailer.yml index 9f57f8b7..46445092 100644 --- a/roles/matrix-mailer/tasks/setup_mailer.yml +++ b/roles/matrix-mailer/tasks/setup_mailer.yml @@ -46,6 +46,7 @@ stat: path: "/etc/systemd/system/matrix-mailer.service" register: matrix_mailer_service_stat + when: "not matrix_mailer_enabled" - name: Ensure matrix-mailer is stopped service: diff --git a/roles/matrix-nginx-proxy/tasks/setup_nginx_proxy.yml b/roles/matrix-nginx-proxy/tasks/setup_nginx_proxy.yml index d0075702..c0188a4e 100644 --- a/roles/matrix-nginx-proxy/tasks/setup_nginx_proxy.yml +++ b/roles/matrix-nginx-proxy/tasks/setup_nginx_proxy.yml @@ -132,6 +132,7 @@ stat: path: "/etc/systemd/system/matrix-nginx-proxy.service" register: matrix_nginx_proxy_service_stat + when: "not matrix_nginx_proxy_enabled" - name: Ensure matrix-nginx-proxy is stopped service: diff --git a/roles/matrix-riot-web/tasks/setup_riot_web.yml b/roles/matrix-riot-web/tasks/setup_riot_web.yml index 9828ae2a..a8a314b0 100644 --- a/roles/matrix-riot-web/tasks/setup_riot_web.yml +++ b/roles/matrix-riot-web/tasks/setup_riot_web.yml @@ -60,6 +60,7 @@ stat: path: "/etc/systemd/system/matrix-riot-web.service" register: matrix_riot_web_service_stat + when: "not matrix_riot_web_enabled" - name: Ensure matrix-riot-web is stopped service: diff --git a/roles/matrix-synapse/tasks/setup_synapse_goofys.yml b/roles/matrix-synapse/tasks/setup_synapse_goofys.yml index ae4349cd..7cb1d513 100644 --- a/roles/matrix-synapse/tasks/setup_synapse_goofys.yml +++ b/roles/matrix-synapse/tasks/setup_synapse_goofys.yml @@ -53,6 +53,7 @@ stat: path: "/etc/systemd/system/matrix-goofys.service" register: matrix_goofys_service_stat + when: "not matrix_s3_media_store_enabled" - name: Ensure matrix-goofys is stopped service: