From 8c8cf27c2cb0311404a7ea23204c0cd2e140d506 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 1 Jun 2020 15:30:11 -0700 Subject: [PATCH] openqa: conditionally skip relvalconsumer and check-compose We don't really want/need these roles in IAD yet at all, but the way the plays are right now we're sort of required to do them. This skips the queues and roles if a key variable isn't defined, which should let us skip these cleanly for the IAD deployment. Signed-off-by: Adam Williamson --- playbooks/groups/openqa.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/playbooks/groups/openqa.yml b/playbooks/groups/openqa.yml index 11b5beaf98..6c87aa14e3 100644 --- a/playbooks/groups/openqa.yml +++ b/playbooks/groups/openqa.yml @@ -103,6 +103,7 @@ env: "production" env_suffix: "" tags: ['rabbit'] + when: "relvalconsumer_env_suffix is defined" # relvalamiconsumer queue, we still use openqa auth for this as it's # easy that way - role: rabbit/queue @@ -119,6 +120,7 @@ env: "production" env_suffix: "" tags: ['rabbit'] + when: "relvalconsumer_env_suffix is defined" # check-compose queue, we still use openqa auth for this as it's # easy that way @@ -136,6 +138,7 @@ env: "{{ checkcompose_env }}" env_suffix: "{{ checkcompose_env_suffix }}" tags: ['rabbit'] + when: "checkcompose_env_suffix is defined" - name: set up openQA server data NFS mounts (staging) hosts: openqa_stg @@ -199,8 +202,8 @@ roles: - { role: openqa/server, tags: ['openqa_server'] } - { role: openqa/dispatcher, tags: ['openqa_dispatcher'] } - - { role: check-compose, tags: ['check-compose'] } - - { role: relvalconsumer, tags: ['relvalconsumer'] } + - { role: check-compose, tags: ['check-compose'], when: "checkcompose_env_suffix is defined" } + - { role: relvalconsumer, tags: ['relvalconsumer'], when: "relvalconsumer_env_suffix is defined" } handlers: - import_tasks: "{{ handlers_path }}/restart_services.yml"