36 lines
868 B
YAML
36 lines
868 B
YAML
---
|
|
- name: Get the path of tripleo undercloud config file
|
|
become: true
|
|
hiera:
|
|
name: "tripleo_undercloud_conf_file"
|
|
|
|
- name: Get local_ip value from the undercloud.conf file
|
|
become: true
|
|
validations_read_ini:
|
|
path: "{{ tripleo_undercloud_conf_file }}"
|
|
section: DEFAULT
|
|
key: local_ip
|
|
ignore_missing_file: True
|
|
register: local_ip
|
|
|
|
- name: Set container registry host
|
|
set_fact:
|
|
container_registry_host: >-
|
|
{{ local_ip.value|default('0.0.0.0', true)|ipaddr('address') }}
|
|
|
|
- name: Ensure port is open
|
|
wait_for:
|
|
port: "{{ container_registry_port }}"
|
|
host: "{{ container_registry_host }}"
|
|
timeout: 10
|
|
|
|
- name: Ensure registry does answer
|
|
uri:
|
|
method: HEAD
|
|
url: "http://{{ container_registry_host }}:{{ container_registry_port }}/v2/index.json"
|
|
status_code:
|
|
- 200
|
|
- 204
|
|
- 301
|
|
- 302
|