From 8406ff979c848d50d4270636bacca1119ee20e08 Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Thu, 3 Feb 2022 13:30:57 +0100 Subject: [PATCH] Substituting 'localhost' for wildcard '*' in image-serve validation Recent changes to the httpd config template[0] have led to failure of the image-serve validation during the "Ensure registry does answer" task as the '*' host was not reachable. Substitution of the 'localhost' for '*' should resolve the issue. Same modification was applied to the "Ensure port is open" task for the sake of consistency. Closes-Bug: #1959864 [0] https://opendev.org/openstack/tripleo-ansible/commit/9b2ffd10dccefcb5462a12ffb86d1eaf8b64adb5 Signed-off-by: Jiri Podivin Change-Id: I90171b424f0678001c2ca53a1fee819993fff6f5 (cherry picked from commit 16dfbae6a0b36922497a124426d59a934b9d4256) --- roles/image_serve/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/image_serve/tasks/main.yaml b/roles/image_serve/tasks/main.yaml index 28413e299..d5d7d285c 100644 --- a/roles/image_serve/tasks/main.yaml +++ b/roles/image_serve/tasks/main.yaml @@ -17,13 +17,13 @@ - name: Ensure port is open wait_for: port: "{{ container_registry_port }}" - host: "{{ virthost_name.stdout }}" + host: "{{ virthost_name.stdout | regex_replace('^\\*$', 'localhost')}}" timeout: 10 - name: Ensure registry does answer uri: method: HEAD - url: "http://{{ virthost_name.stdout }}:{{ container_registry_port }}/v2/index.json" + url: "http://{{ virthost_name.stdout | regex_replace('^\\*$', 'localhost')}}:{{ container_registry_port }}/v2/index.json" status_code: - 200 - 204