Initialize registry_namespaces unconditionally if not initialized
The deploy-env playbook can fail with an error stating that registry_namespaces is not defined in some cases. This change moves the initialization of registry_namespaces so that buildset_registry is not required for it to be set when other conditions are not met. Change-Id: I160e7d479008fd3afd460382691673b92bd042c9
This commit is contained in:
parent
ee22dd9b4e
commit
426c71f753
@ -80,6 +80,11 @@
|
|||||||
skip_verify: true
|
skip_verify: true
|
||||||
when: registry_mirror is defined
|
when: registry_mirror is defined
|
||||||
|
|
||||||
|
- name: Init registry_namespaces if not defined
|
||||||
|
set_fact:
|
||||||
|
registry_namespaces: "[]"
|
||||||
|
when: not registry_namespaces is defined
|
||||||
|
|
||||||
- name: Buildset registry namespace
|
- name: Buildset registry namespace
|
||||||
when: buildset_registry is defined
|
when: buildset_registry is defined
|
||||||
block:
|
block:
|
||||||
@ -106,11 +111,6 @@
|
|||||||
ca: "/usr/local/share/ca-certificates/{{ buildset_registry_alias }}.crt"
|
ca: "/usr/local/share/ca-certificates/{{ buildset_registry_alias }}.crt"
|
||||||
auth: "{{ (buildset_registry.username + ':' + buildset_registry.password) | b64encode }}"
|
auth: "{{ (buildset_registry.username + ':' + buildset_registry.password) | b64encode }}"
|
||||||
|
|
||||||
- name: Init registry_namespaces if not defined
|
|
||||||
set_fact:
|
|
||||||
registry_namespaces: "[]"
|
|
||||||
when: not registry_namespaces is defined
|
|
||||||
|
|
||||||
- name: Append buildset_registry to registry namespaces
|
- name: Append buildset_registry to registry namespaces
|
||||||
when:
|
when:
|
||||||
- buildset_registry_namespace is defined
|
- buildset_registry_namespace is defined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user