Add missing slash if docker registry is specified

If user specifies registry a full image name is constructed by
concatenation of the registry, namespace and image. Currently
concatenation does not include '/' if registry is non-empty but
it should. If registry is empty '/' is not required.
This fix covers both use cases with help of Ansible filter.

Change-Id: I0588dd0da55d777e6caa7eb47d51b2435d38d5e0
Closes-Bug: #1479013
This commit is contained in:
Vladislav Belogrudov
2015-07-30 16:49:35 +03:00
parent acfa1378fc
commit 2887c6d2e4
7 changed files with 8 additions and 8 deletions

View File

@@ -5,7 +5,7 @@ project_name: "haproxy"
####################
# Docker
####################
docker_haproxy_registry: "{{ docker_registry }}"
docker_haproxy_registry: "{{ docker_registry ~ '/' if docker_registry else '' }}"
docker_haproxy_namespace: "{{ docker_namespace }}"
kolla_haproxy_base_distro: "{{ kolla_base_distro }}"
kolla_haproxy_install_type: "{{ kolla_install_type }}"
@@ -16,7 +16,7 @@ docker_haproxy_tag: "{{ openstack_release }}"
docker_haproxy_image_full: "{{ docker_haproxy_image }}:{{ docker_haproxy_tag }}"
docker_keepalived_registry: "{{ docker_registry }}"
docker_keepalived_registry: "{{ docker_registry ~ '/' if docker_registry else '' }}"
docker_keepalived_namespace: "{{ docker_namespace }}"
kolla_keepalived_base_distro: "{{ kolla_base_distro }}"
kolla_keepalived_install_type: "{{ kolla_install_type }}"