From 98fff91df948a9568df26fdd9d01755c85dc0f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kone=C4=8Dn=C3=BD?= Date: Thu, 28 Feb 2019 15:48:45 +0100 Subject: [PATCH] the-new-hotness, release-monitoring: Add env_suffix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Konečný --- .../openshift-apps/release-monitoring.yml | 16 +--------------- playbooks/openshift-apps/the-new-hotness.yml | 18 +----------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/playbooks/openshift-apps/release-monitoring.yml b/playbooks/openshift-apps/release-monitoring.yml index e726ef6112..823d4fbe72 100644 --- a/playbooks/openshift-apps/release-monitoring.yml +++ b/playbooks/openshift-apps/release-monitoring.yml @@ -13,7 +13,7 @@ tasks: - name: Create the RabbitMQ user rabbitmq_user: - user: "anitya" + user: "anitya{{ env_suffix }}" vhost: /pubsub read_priv: "^anitya.*$" write_priv: "amq.topic" @@ -49,25 +49,11 @@ secret_name: release-monitoring-fedora-messaging-key key: fedora-messaging-release-monitoring.key privatefile: "rabbitmq/{{env}}/pki/private/anitya{{env_suffix}}.key" - when: env == "staging" - role: openshift/secret-file app: release-monitoring secret_name: release-monitoring-fedora-messaging-cert key: fedora-messaging-release-monitoring.crt privatefile: "rabbitmq/{{env}}/pki/issued/anitya{{env_suffix}}.crt" - when: env == "staging" - - role: openshift/secret-file - app: release-monitoring - secret_name: release-monitoring-fedora-messaging-key - key: fedora-messaging-release-monitoring.key - privatefile: "rabbitmq/{{env}}/pki/private/anitya.key" - when: env != "staging" - - role: openshift/secret-file - app: release-monitoring - secret_name: release-monitoring-fedora-messaging-cert - key: fedora-messaging-release-monitoring.crt - privatefile: "rabbitmq/{{env}}/pki/issued/anitya.crt" - when: env != "staging" - role: openshift/object app: release-monitoring file: imagestream.yml diff --git a/playbooks/openshift-apps/the-new-hotness.yml b/playbooks/openshift-apps/the-new-hotness.yml index d89f7b3405..5c594c5c9e 100644 --- a/playbooks/openshift-apps/the-new-hotness.yml +++ b/playbooks/openshift-apps/the-new-hotness.yml @@ -10,7 +10,7 @@ roles: - role: rabbit/queue - username: the-new-hotness + username: the-new-hotness{{ env_suffix }} queue_name: the-new-hotness routing_keys: - "#" @@ -32,28 +32,12 @@ secret_name: the-new-hotness-fedora-messaging-key key: fedora-messaging-the-new-hotness.key privatefile: "rabbitmq/{{env}}/pki/private/the-new-hotness{{env_suffix}}.key" - when: env == "staging" - role: openshift/secret-file app: the-new-hotness secret_name: the-new-hotness-fedora-messaging-cert key: fedora-messaging-the-new-hotness.crt privatefile: "rabbitmq/{{env}}/pki/issued/the-new-hotness{{env_suffix}}.crt" - when: env == "staging" - - - role: openshift/secret-file - app: the-new-hotness - secret_name: the-new-hotness-fedora-messaging-key - key: fedora-messaging-the-new-hotness.key - privatefile: "rabbitmq/{{env}}/pki/private/the-new-hotness.key" - when: env != "staging" - - - role: openshift/secret-file - app: the-new-hotness - secret_name: the-new-hotness-fedora-messaging-cert - key: fedora-messaging-the-new-hotness.crt - privatefile: "rabbitmq/{{env}}/pki/issued/the-new-hotness.crt" - when: env != "staging" - role: openshift/object app: the-new-hotness