From a4a3a0274b5d74297a7982098e801b57bc8d849f Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Tue, 26 Mar 2019 13:27:05 -0400 Subject: [PATCH] role-ara-api: only set up or restart a wsgi server if there's one defined Change-Id: I28fc9f6578f19994c125a9c63fd5afbe926e31b0 --- roles/ara_api/handlers/main.yaml | 4 +++- roles/ara_api/tasks/main.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/ara_api/handlers/main.yaml b/roles/ara_api/handlers/main.yaml index 4271b3f5..7bfeae12 100644 --- a/roles/ara_api/handlers/main.yaml +++ b/roles/ara_api/handlers/main.yaml @@ -21,4 +21,6 @@ service: name: ara-api state: restarted - when: ara_api_service_enabled is not changed + when: + - ara_api_wsgi_server is not none + - ara_api_service_enabled is not changed diff --git a/roles/ara_api/tasks/main.yaml b/roles/ara_api/tasks/main.yaml index d0faf1d2..307dc9ad 100644 --- a/roles/ara_api/tasks/main.yaml +++ b/roles/ara_api/tasks/main.yaml @@ -36,6 +36,7 @@ - name: Include installation of the WSGI backend server include_tasks: "wsgi_server/{{ ara_api_wsgi_server }}.yaml" + when: ara_api_wsgi_server is not none - name: Include installation of the frontend server include_role: