Merge "Add second fact to ensure type safty"

This commit is contained in:
Zuul 2019-10-01 02:58:54 +00:00 committed by Gerrit Code Review
commit ee44e97440
2 changed files with 17 additions and 0 deletions

View File

@ -168,6 +168,14 @@ outputs:
set_fact:
container_registry_logins: "{{ container_registry_logins_json | from_json }}"
when:
- container_registry_logins_json is string
- container_registry_login | bool
- (container_registry_logins_json | length) > 0
- name: Set registry logins
set_fact:
container_registry_logins: "{{ container_registry_logins_json }}"
when:
- container_registry_logins_json is mapping
- container_registry_login | bool
- (container_registry_logins_json | length) > 0
- include_role:

View File

@ -90,6 +90,15 @@ outputs:
set_fact:
container_registry_logins: "{{ container_registry_logins_json | from_json }}"
when:
- container_registry_logins_json is string
- container_registry_login | bool
- (container_registry_logins_json | length) > 0
- name: Set registry logins
set_fact:
container_registry_logins: "{{ container_registry_logins_json }}"
when:
- container_registry_logins_json is mapping
- container_registry_login | bool
- (container_registry_logins_json | length) > 0