-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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:
-
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_testeris being skipped. -
The exact condition or guard that causes the skip.
-
Whether the skip is due to:
- incorrect
when:logic - a faulty
ansible_factsOS-family check - incorrect idempotency guard (
creates:/removes:) - the role incorrectly assuming the binary already exists
- path resolution issues inside the runner
- or another misconfiguration
- incorrect
-
-
Determine the root cause of why the task behaves differently in:
- local shells (works),
- GitHub Actions ephemeral Ubuntu job (skips).
-
Apply a fix to the
ansible/roles/cli_testerrole 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.).
- The “install
-
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
-
Validate the fix by ensuring the updated Action run will:
- install
whichsuccessfully, - continue through the role without skipping,
- and complete the full
op_testerworkflow without error.
- install
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_testerrole 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.