Skip to content

Commit 7b31f9e

Browse files
committed
better handling of mirror conditions using additional images
1 parent df2a10a commit 7b31f9e

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

playbooks/tasks/deploy_plugin.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
file: mirror_plugin.yaml
120120
when:
121121
- plugin.mirror | default('none') == 'plugin'
122-
- plugin.operators | default([]) | length > 0
122+
- plugin.operators | default([]) | length > 0 or plugin.additionalImages | default([]) | length > 0
123123
- disconnected | default(true) | bool
124124
tags: mirror
125125

@@ -135,7 +135,6 @@
135135
when:
136136
- plugin.registries is defined
137137
- plugin.mirror | default('none') in ['core', 'plugin']
138-
- plugin.operators | default([]) | length > 0
139138
- disconnected | default(true) | bool
140139
tags: mirror
141140

playbooks/tasks/mirror_plugin.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
that:
55
- plugin is defined
66
- plugin.mirror | default('none') == 'plugin'
7-
- plugin.operators | default([]) | length > 0
7+
- plugin.operators | default([]) | length > 0 or plugin.additionalImages | default([]) | length > 0
88
- disconnected | default(true) | bool
9-
fail_msg: "Validation Error: Ensure 'plugin' is defined, 'plugin.mirror' is set to 'plugin', 'plugin.operators' is not empty, and 'disconnected' is true."
9+
fail_msg: >-
10+
Validation Error: Ensure 'plugin' is defined, 'plugin.mirror' is set to 'plugin',
11+
'plugin.operators' or 'plugin.additionalImages' are not empty, and 'disconnected' is true.
1012
1113
- name: Set catalog image and mirror defaults
1214
set_fact:

0 commit comments

Comments
 (0)