diff --git a/ansible/container-image-build.yml b/ansible/container-image-build.yml index 78070e259..78f097afe 100644 --- a/ansible/container-image-build.yml +++ b/ansible/container-image-build.yml @@ -38,7 +38,9 @@ username: "{{ kolla_docker_registry_username }}" password: "{{ kolla_docker_registry_password }}" reauthorize: yes - when: kolla_docker_registry_username is not none and kolla_docker_registry_password is not none + when: + - kolla_docker_registry_username is not none + - kolla_docker_registry_password is not none - name: Ensure Kolla container images are built shell: > @@ -47,7 +49,7 @@ kolla-build \ --config-dir {{ kolla_build_config_path }} \ {% if item.type is defined %}--type {{ item.type }}{% endif %} \ - {% if kolla_docker_registry != "" and kolla_docker_registry != None %}--registry {{ kolla_docker_registry }}{% endif %} \ + {% if kolla_docker_registry is not none %}--registry {{ kolla_docker_registry }}{% endif %} \ {% if push_images | bool %}--push{% endif %} \ {{ item.regexes }} 2>&1 | tee --append {{ kolla_build_log_path }} with_items: "{{ container_image_sets }}"