From b84ea6ee914bcd44bf2801e5cc3f87cefceb7e3e Mon Sep 17 00:00:00 2001
From: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
Date: Wed, 9 Oct 2024 12:36:52 +0200
Subject: [PATCH] Add rabbitmq caching mirrors

This adds RabbitMQ/Erlang caching mirror to the list, as remote
connections tend to fail due to Timeouts lately. Below are just some
examples of failed jobs due to that

[1] https://review.opendev.org/c/openstack/openstack-ansible/+/931612
[2] https://review.opendev.org/c/openstack/openstack-ansible-os_octavia/+/930469
[3] https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/931801
[4] https://review.opendev.org/c/openstack/openstack-ansible-rabbitmq_server/+/931802

Change-Id: I1831b8fb8a7b5882953a0a66bf0136345739cad4
---
 playbooks/roles/mirror/templates/mirror.vhost.j2 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/playbooks/roles/mirror/templates/mirror.vhost.j2 b/playbooks/roles/mirror/templates/mirror.vhost.j2
index 851d048052..b79f861163 100644
--- a/playbooks/roles/mirror/templates/mirror.vhost.j2
+++ b/playbooks/roles/mirror/templates/mirror.vhost.j2
@@ -294,6 +294,16 @@ ErrorLogFormat "[%{cu}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% , \
     ProxyPass "/percona/" "https://repo.percona.com/" ttl=120 keepalive=On retry=0
     ProxyPassReverse "/percona/" "https://repo.percona.com/"
 
+    # RabbitMQ Deb
+    CacheEnable disk "/rabbitmq-deb"
+    ProxyPass "/rabbitmq-deb" "https://ppa1.rabbitmq.com/rabbitmq/" ttl=120 keepalive=On retry=0
+    ProxyPassReverse "/rabbitmq-deb/" "https://ppa1.rabbitmq.com/rabbitmq/"
+
+    # RabbitMQ DNF
+    CacheEnable disk "/rabbitmq-dnf"
+    ProxyPass "/rabbitmq-dnf" "https://yum1.rabbitmq.com/rabbitmq/" ttl=120 keepalive=On retry=0
+    ProxyPassReverse "/rabbitmq-dnf/" "https://yum1.rabbitmq.com/rabbitmq/"
+
     # MariaDB
     CacheEnable disk "/MariaDB"
     ProxyPass "/MariaDB/" "https://downloads.mariadb.com/MariaDB/" ttl=120 keepalive=On retry=0