# SPDX-License-Identifier: MIT
---
- name: Check if OpenMetrics PMDA has Spark metrics registered
  command: pmprobe -I openmetrics.control.status
  register: status
  until: status.stdout.find("spark") != -1
  retries: 10
  delay: 1
  changed_when: false
  when:
    - "'pcp-pmda-openmetrics' in __spark_packages_pcp"
    - __metrics_is_booted | bool
