Skip to content

Resolve bug for CLI test installation #48

@SRF-Audio

Description

@SRF-Audio

Issue: Diagnose and Fix Missing which Installation in cli_tester Role During GitHub Action Run

Summary

The GitHub Action run “Ansible Site Test #39 is skipping the installation of the which binary inside the cli_tester Ansible role. This only occurs inside the GitHub Actions runtime environment; the role works as expected locally. We need Copilot to inspect what is happening in the logs, identify why the task is being skipped, and rewrite the role logic so the installation is reliable and always runs when required.

Background

Our GitHub Action executes the ansible/playbooks/op_tester.yml playbook as part of the “Ansible Site Test” workflow. During this workflow, the role ansible/roles/cli_tester contains a task intended to install which (or ensure it exists) before validating the environment.

However, in run #39, the Action output shows that the installation step is being skipped, causing downstream tasks that depend on which to fail. The same role does not skip locally, which implies something about environment detection, when conditions, idempotency guards, or OS-family logic is not working inside the ephemeral Ubuntu runner.

What Copilot Should Do

Copilot must:

  1. Read the logs from “Ansible Site Test Add Fedora 43 Ansible base image and GitHub Actions test workflow #39 and identify:

    • Which specific task in cli_tester is being skipped.

    • The exact condition or guard that causes the skip.

    • Whether the skip is due to:

      • incorrect when: logic
      • a faulty ansible_facts OS-family check
      • incorrect idempotency guard (creates: / removes:)
      • the role incorrectly assuming the binary already exists
      • path resolution issues inside the runner
      • or another misconfiguration
  2. Determine the root cause of why the task behaves differently in:

    • local shells (works),
    • GitHub Actions ephemeral Ubuntu job (skips).
  3. Apply a fix to the ansible/roles/cli_tester role so that:

    • The “install which” task is always executed when the binary is missing.
    • No OS detection logic is incorrectly filtering out the task.
    • The fix is idempotent and follows Ansible best practices.
    • All tasks use FQCN modules (ansible.builtin.package, etc.).
  4. Update the role following the user's Ansible Prime Directives:

    • Fully-qualified collection names
    • Idempotency
    • No unnecessary variables or config creep
    • DRY and modular
    • No inline YAML comments inside the final code
  5. Validate the fix by ensuring the updated Action run will:

    • install which successfully,
    • continue through the role without skipping,
    • and complete the full op_tester workflow without error.

Acceptance Criteria

  • A clear explanation appears in the PR describing why the task was being skipped in run Add Fedora 43 Ansible base image and GitHub Actions test workflow #39.
  • cli_tester role is updated so the install task runs consistently in GitHub Actions.
  • The next run of “Ansible Site Test” should confirm successful installation.
  • No change breaks local execution or introduces configuration creep.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions