# SPDX-License-Identifier: MIT
---
- name: Check if PMDA packages are installed
  command: rpm -q pcp-pmda-{{ item }} # noqa command-instead-of-module
  changed_when: false
  loop:
    - bpftrace

- name: Check if PMDAs are installed
  shell: |
    set -euo pipefail
    pcp | grep -E '^\s*pmda' | grep -w {{ item }}
  changed_when: false
  loop:
    - bpftrace
  when: __metrics_is_booted | bool
