aboutsummaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2025-10-08 17:12:35 +0200
committerMichal Nasiadka <mnasiadka@gmail.com>2025-10-10 13:52:36 +0000
commitff5cbf0538ad29eea63c8d27fcd0fd895ccebbba (patch)
treec4b93c3fbb7b6eb49374e18baa589999de943e80 /roles
parent45e7b9ec4435d334c5757a1e5a6352b9f342567e (diff)
downloadkolla-ansible-ff5cbf0538ad29eea63c8d27fcd0fd895ccebbba.tar.gz
kolla-ansible-ff5cbf0538ad29eea63c8d27fcd0fd895ccebbba.zip
CI: Rework test-dashboard.sh to Ansible role
Change-Id: Iaeb6786625c8c0c71c7b4e0ab9450c67bc13ed1c Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'roles')
-rw-r--r--roles/kolla-ansible-test-dashboard/tasks/main.yml21
1 files changed, 21 insertions, 0 deletions
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