Let's say we have host-1 with runner_version: 2.316.1 and host-2 with runner_version: "latest". Role will fail in that case.
I suppose it's because the following task has when: runner_version == "latest" condition:
TASK [ansible-github_actions_runner : Find the latest runner version (RUN ONCE)] ***
skipping: [host-1]
...
TASK [ansible-github_actions_runner : Set runner_version variable (If latest)] ***
skipping: [host-1]
fatal: [host-2]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'json'\n\nThe error appears to be in '/__w/infra-github-runners/infra-github-runners/roles/ansible-github_actions_runner/tasks/install_runner.yml': line 10, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set runner_version variable (If latest)\n ^ here\n"}
### Expected Results
`api_response` is set for all hosts in play
### Actual Results
```console
`api_response` is set only if the first host has `runner_version: "latest"`
Summary
Let's say we have host-1 with
runner_version: 2.316.1
and host-2 withrunner_version: "latest"
. Role will fail in that case. I suppose it's because the following task haswhen: runner_version == "latest"
condition:Issue Type
Bug Report
Ansible Version
Steps to Reproduce
... TASK [ansible-github_actions_runner : Set runner_version variable (If latest)] *** skipping: [host-1] fatal: [host-2]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'json'\n\nThe error appears to be in '/__w/infra-github-runners/infra-github-runners/roles/ansible-github_actions_runner/tasks/install_runner.yml': line 10, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set runner_version variable (If latest)\n ^ here\n"}