-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path02-mirror.yaml
More file actions
68 lines (63 loc) · 2.1 KB
/
02-mirror.yaml
File metadata and controls
68 lines (63 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# Phase 2: Mirror - Set up mirror registry and mirror images
# This phase is ONLY for disconnected deployments
#
# Performs:
# - Deploy local Quay registry (mirror-registry)
# - Generate combined pull secret
# - Run oc-mirror to mirror OpenShift images and operator catalogs
# - Mirror additional images (Vault, ArgoCD, etc.)
# - Mirror images to datacenter cache (optional)
#
# IMPORTANT: This phase requires significant disk space (~150GB+) and time (~30+ minutes)
#
# Usage:
# ansible-playbook playbooks/02-mirror.yaml -e workingDir=/home/cloud-user
#
# # Mirror images to datacenter cache
# ansible-playbook playbooks/02-mirror.yaml -e workingDir=/home/cloud-user --tags mirror-cache
- name: Phase 2 - Mirror registry setup
hosts: localhost
gather_facts: false
environment:
PATH: "{{ workingDir }}/bin:{{ lookup('env', 'PATH') }}"
tasks:
- name: Load common variables
ansible.builtin.include_tasks:
file: common/load-vars.yaml
apply:
tags: always
tags: always
- name: Collect plugin operators for imageset
ansible.builtin.include_tasks:
file: tasks/collect_core_plugin_operators.yaml
apply:
tags:
- mirror-registry
- mirror-plugins
- mirror-cache
tags:
- mirror-registry
- mirror-plugins
- mirror-cache
- name: Include tasks for mirror-cache
ansible.builtin.include_tasks:
file: tasks/mirror_cache.yaml
apply:
tags: mirror-cache
tags:
- mirror-cache
- never
- name: Verify disconnected mode
ansible.builtin.assert:
that:
- disconnected | default(true) | bool
fail_msg: "Phase 2 (Mirror) should only run in disconnected mode. Set disconnected=true in config/global.yaml"
success_msg: "Running in disconnected mode - proceeding with mirroring"
tags: mirror-registry
- name: Include tasks for mirror-registry
ansible.builtin.include_tasks:
file: tasks/mirror_registry.yaml
apply:
tags: mirror-registry
tags: mirror-registry