Convert the heat json format to a py dict
This change converts a heat json format option to a py dict within a jinja expresion. Closes-Bug: #1835657 Related-Bug: #1833584 Change-Id: I4b44214cd7007dc31ad5f4e0a0d7a3a531a9f20e Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
parent
28b0c4445d
commit
6e07f2a767
@ -161,7 +161,15 @@ outputs:
|
||||
- true
|
||||
- false
|
||||
container_registry_login: {get_param: ContainerImageRegistryLogin}
|
||||
container_registry_logins: {get_param: ContainerImageRegistryCredentials}
|
||||
# default that is overwritten by the heat -> dict conversion
|
||||
container_registry_logins: {}
|
||||
container_registry_logins_json: {get_param: ContainerImageRegistryCredentials}
|
||||
- name: Convert logins json to dict
|
||||
set_fact:
|
||||
container_registry_logins: "{{ container_registry_logins_json | from_json }}"
|
||||
when:
|
||||
- container_registry_login | bool
|
||||
- (container_registry_logins_json | length) > 0
|
||||
- include_role:
|
||||
name: container-registry
|
||||
tasks_from: docker
|
||||
|
@ -67,14 +67,23 @@ outputs:
|
||||
host_prep_tasks:
|
||||
- name: Install and configure Podman
|
||||
block: &install_and_configure_podman
|
||||
- set_fact:
|
||||
- name: Set login facts
|
||||
set_fact:
|
||||
container_registry_insecure_registries:
|
||||
if:
|
||||
- insecure_registry_is_empty
|
||||
- []
|
||||
- {get_param: DockerInsecureRegistryAddress}
|
||||
container_registry_login: {get_param: ContainerImageRegistryLogin}
|
||||
container_registry_logins: {get_param: ContainerImageRegistryCredentials}
|
||||
# default that is overwritten by the heat -> dict conversion
|
||||
container_registry_logins: {}
|
||||
container_registry_logins_json: {get_param: ContainerImageRegistryCredentials}
|
||||
- name: Convert logins json to dict
|
||||
set_fact:
|
||||
container_registry_logins: "{{ container_registry_logins_json | from_json }}"
|
||||
when:
|
||||
- container_registry_login | bool
|
||||
- (container_registry_logins_json | length) > 0
|
||||
- name: ensure podman and deps are installed
|
||||
package:
|
||||
name: podman
|
||||
@ -101,10 +110,10 @@ outputs:
|
||||
REGISTRY_USERNAME: "{{ lookup('dict', item.value).key }}"
|
||||
REGISTRY_PASSWORD: "{{ lookup('dict', item.value).value }}"
|
||||
REGISTRY: "{{ item.key }}"
|
||||
loop: "{{ lookup('dict', container_registry_logins) }}"
|
||||
loop: "{{ query('dict', container_registry_logins) }}"
|
||||
when:
|
||||
- container_registry_login | bool
|
||||
- container_registry_logins | length > 0
|
||||
- container_registry_logins
|
||||
service_config_settings: {}
|
||||
upgrade_tasks:
|
||||
- block:
|
||||
|
Loading…
x
Reference in New Issue
Block a user