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 0bfba48a7..816f05c12 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 5dd0db41f..6fd3ea72f 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 9f57f8b72..46445092c 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 d0075702a..c0188a4e1 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 9828ae2a2..a8a314b0e 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 ae4349cd0..7cb1d5135 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: