--- - name: Start port forwarding to loki-http ansible.builtin.shell: | kubectl port-forward service/loki-http 3100 -n sf async: 60 poll: 0 - name: Ensure loki is reachable ansible.builtin.uri: url: http://localhost:3100/loki/api/v1/status/buildinfo return_content: yes register: loki_buildinfo delay: 6 retries: 10 until: "loki_buildinfo.status == 200 and '2.9.2' in loki_buildinfo.content" - name: Aggregate logs collected by loki ansible.builtin.shell: "~/bin/logcli query '{application=\"{{ item }}\"}' --quiet --limit 5" register: xxx_logs failed_when: xxx_logs.stdout|length < 1 loop: - zuul - nodepool - mariadb - zookeeper - name: Ensure DIB logs are collected by loki ansible.builtin.shell: "~/bin/logcli query '{labels_run=\"dib\"}' --quiet --limit 5" register: dib_logs failed_when: dib_logs.stdout|length < 1