Files
openstack-helm/tools/gate/playbooks/buildset_registry_alias.yaml
Vladimir Kozhukalov b9da4fcbf6 Fix deployment jobs when used for testing images
Change-Id: I0f12c83c4896c699a0b6c13bbff7bc520ca56e46
2023-09-19 04:52:41 +03:00

21 lines
745 B
YAML

- name: Configure /etc/hosts for buildset_registry to workaround docker not understanding ipv6 addresses
become: true
lineinfile:
path: /etc/hosts
state: present
regex: "^{{ buildset_registry.host }}\tzuul-jobs.buildset-registry$"
line: "{{ buildset_registry.host }}\tzuul-jobs.buildset-registry"
insertafter: EOF
when:
- 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
- name: Set buildset_registry alias variable when using name
set_fact:
buildset_registry_alias: "{{ buildset_registry.host }}"
when:
- not ( buildset_registry.host | ipaddr )