[stable/2023.1] Switch everything to use mirrors (#2135)

This is an automated cherry-pick of #2131
/assign mnaser
diff --git a/roles/defaults/helpers.go b/roles/defaults/helpers.go
index a7bd833..f2ba4bb 100644
--- a/roles/defaults/helpers.go
+++ b/roles/defaults/helpers.go
@@ -24,5 +24,5 @@
 	image, err := GetImageByKey(imageName)
 	require.NoError(t, err)
 
-	assert.Equal(t, expected, image)
+	assert.Contains(t, image, expected)
 }
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index 826bddd..f138d9d 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -8,6 +8,8 @@
 - job:
     name: atmosphere-golang-go-test
     parent: atmosphere-golang-go
+    pre-run:
+      - zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
     vars:
       go_command: test ./... -v
 
@@ -34,20 +36,25 @@
 - job:
     name: atmosphere-build-collection
     parent: build-ansible-collection
-    pre-run: zuul.d/playbooks/build-collection/pre.yml
+    pre-run:
+      - zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
+      - zuul.d/playbooks/build-collection/pre.yml
     irrelevant-files:
       - ^doc/
 
 - job:
     name: atmosphere-publish-collection
     parent: publish-ansible-collection-vexxhost
-    pre-run: zuul.d/playbooks/build-collection/pre.yml
+    pre-run:
+      - zuul.d/playbooks/build-collection/pre.yml
 
 - job:
     name: atmosphere-molecule
     parent: tox
     abstract: true
-    pre-run: zuul.d/playbooks/molecule/pre.yml
+    pre-run:
+      - zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
+      - zuul.d/playbooks/molecule/pre.yml
     run: zuul.d/playbooks/molecule/run.yml
     post-run: zuul.d/playbooks/molecule/post.yml
     irrelevant-files:
diff --git a/zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml b/zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
new file mode 100644
index 0000000..c925321
--- /dev/null
+++ b/zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
@@ -0,0 +1,15 @@
+- name: Switch to Atmosphere image mirror
+  hosts: all
+  tasks:
+    # TODO(mnaser): Drop this when we can use https://github.com/vexxhost/atmosphere/pull/977
+    - name: Prefix all images for the job to point to mirror
+      ansible.builtin.shell: |
+        sed -i '/registry.atmosphere.dev/!s/  \(.*\): \(.*\)$/  \1: registry.atmosphere.dev\/\2/' roles/defaults/vars/main.yml
+      args:
+        chdir: "{{ zuul.project.src_dir }}"
+
+    - name: Print out the image list
+      ansible.builtin.shell: |
+        cat roles/defaults/vars/main.yml
+      args:
+        chdir: "{{ zuul.project.src_dir }}"
diff --git a/zuul.d/playbooks/molecule/pre.yml b/zuul.d/playbooks/molecule/pre.yml
index 454e01e..932838e 100644
--- a/zuul.d/playbooks/molecule/pre.yml
+++ b/zuul.d/playbooks/molecule/pre.yml
@@ -35,13 +35,6 @@
         opts: nodev,nosuid,size=512M
         state: mounted
 
-    # TODO(mnaser): Drop this when we can use https://github.com/vexxhost/atmosphere/pull/977
-    - name: Prefix all images for the job to point to mirror
-      ansible.builtin.shell: |
-        sed -i '/registry.atmosphere.dev/!s/  \(.*\): \(.*\)$/  \1: registry.atmosphere.dev\/\2/' roles/defaults/vars/main.yml
-      args:
-        chdir: "{{ zuul.project.src_dir }}"
-
     # TODO(mnaser): Drop this when we move to PBR
     - name: Add current folder to Git's safe directories
       become: true