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]9b2ffd10dcSigned-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: I90171b424f0678001c2ca53a1fee819993fff6f5 (cherry picked from commit16dfbae6a0)
32 lines
922 B
YAML
32 lines
922 B
YAML
---
|
|
- name: Ensure we have the httpd config
|
|
stat:
|
|
path: "{{ container_registry_httpd_config }}"
|
|
register: registry_config
|
|
|
|
- name: Fail early if no httpd config is present
|
|
when: not registry_config.stat.exists
|
|
fail:
|
|
msg: "Unable to find vhost config {{ container_registry_httpd_config }}. Exiting now."
|
|
|
|
- name: Extract vhost name from httpd config
|
|
command: |
|
|
awk -F '[ >:]*' '/VirtualHost/ {print $2; exit}' {{ container_registry_httpd_config }}
|
|
register: virthost_name
|
|
|
|
- name: Ensure port is open
|
|
wait_for:
|
|
port: "{{ container_registry_port }}"
|
|
host: "{{ virthost_name.stdout | regex_replace('^\\*$', 'localhost')}}"
|
|
timeout: 10
|
|
|
|
- name: Ensure registry does answer
|
|
uri:
|
|
method: HEAD
|
|
url: "http://{{ virthost_name.stdout | regex_replace('^\\*$', 'localhost')}}:{{ container_registry_port }}/v2/index.json"
|
|
status_code:
|
|
- 200
|
|
- 204
|
|
- 301
|
|
- 302
|