Add missing conditionals to build-docker-image

We recently added several tasks to the build-docker-image role to
work around docker bugs when using the buildset registry; but this
role doesn't require it so they should be wrapped in a conditional.

Change-Id: Id6e85d07fe34aeb272d7388c778455d5d2a402dd
This commit is contained in:
James E. Blair 2019-04-28 13:36:42 -06:00
parent 58c84203f6
commit bbfcfe7d20
1 changed files with 3 additions and 3 deletions

View File

@ -30,15 +30,15 @@
regex: "^{{ buildset_registry.host }}\tzuul-jobs.buildset-registry$"
line: "{{ buildset_registry.host }}\tzuul-jobs.buildset-registry"
insertafter: EOF
when: buildset_registry.host | ipaddr
when: buildset_registry is defined and buildset_registry.host | ipaddr
- name: Set buildset_registry alias variable when using ip
set_fact:
buildset_registry_alias: zuul-jobs.buildset-registry
when: buildset_registry.host | ipaddr
when: buildset_registry is defined and buildset_registry.host | ipaddr
- name: Set buildset_registry alias variable when using name
set_fact:
buildset_registry_alias: "{{ buildset_registry.host }}"
when: not ( buildset_registry.host | ipaddr )
when: buildset_registry is defined and not ( buildset_registry.host | ipaddr )
# Push each image.
- name: Push image to buildset registry
when: buildset_registry is defined