From ff5cbf0538ad29eea63c8d27fcd0fd895ccebbba Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Wed, 8 Oct 2025 17:12:35 +0200 Subject: CI: Rework test-dashboard.sh to Ansible role Change-Id: Iaeb6786625c8c0c71c7b4e0ab9450c67bc13ed1c Signed-off-by: Michal Nasiadka --- roles/kolla-ansible-test-dashboard/tasks/main.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 roles/kolla-ansible-test-dashboard/tasks/main.yml (limited to 'roles') diff --git a/roles/kolla-ansible-test-dashboard/tasks/main.yml b/roles/kolla-ansible-test-dashboard/tasks/main.yml new file mode 100644 index 000000000..561867aed --- /dev/null +++ b/roles/kolla-ansible-test-dashboard/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: Get contents of clouds.yaml + ansible.builtin.slurp: + src: /etc/kolla/clouds.yaml + register: clouds_yaml + +- name: Query dashboard and check that the returned page looks like a login page + vars: + clouds: "{{ clouds_yaml['content'] | b64decode | from_yaml }}" + url_scheme: "{{ clouds.clouds['kolla-admin'].auth.auth_url | urlsplit('scheme') }}" + url_host: "{{ kolla_external_vip_address | default(kolla_internal_vip_address) }}" + ansible.builtin.uri: + url: "{{ url_scheme + '://' + url_host }}" + ca_path: "{{ clouds.clouds['kolla-admin'].cacert | default(omit) }}" + follow_redirects: "all" + return_content: true + validate_certs: "{{ 'false' if scenario == 'lets-encrypt' else 'true' }}" + register: dashboard_output + until: dashboard_output.content.find('Login') != -1 + retries: 30 + delay: 10 -- cgit v1.2.3