Open
Description
Summary
When I try to create a GitHub runner for the first time on the machine, the step that is supposed to start a GitHub Actions Runner service fails, the log message is written in the Actual result.
Issue Type
Bug Report
Ansible Version
ansible [core 2.18.6]
config file = /home/savochek/YamaProjects/vps-infrastructure/ansible.cfg
configured module search path = ['/home/savochek/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/savochek/.local/share/pipx/venvs/ansible/lib/python3.13/site-packages/ansible
ansible collection location = /home/savochek/.ansible/collections:/usr/share/ansible/collections
executable location = /home/savochek/.local/bin/ansible
python version = 3.13.2 (main, Feb 5 2025, 08:05:21) [GCC 14.2.1 20250128] (/home/savochek/.local/share/pipx/venvs/ansible/bin/python)
jinja version = 3.1.6
libyaml = True
Steps to Reproduce
- name: Apply common configuration to all nodes
hosts: all
roles:
- role: MonolithProjects.github_actions_runner
vars:
github_account: "yama-chat"
runner_user: "gha-runner"
runner_name: "gha-runner"
runner_dir: "/opt/gha-runner"
runner_org: yes
runner_labels: ["vps"]
hide_sensitive_logs: false
Expected Results
The step starts and enables the service.
Actual Results
TASK [MonolithProjects.github_actions_runner : START and enable Github Actions Runner service (Linux)] ****************
fatal: [vps1]: FAILED! => {"msg": "The conditional check 'ansible_facts.system != 'Darwin' and runner_state|lower == \"started\" and ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'\n' failed. The error was: error while evaluating conditional (ansible_facts.system != 'Darwin' and runner_state|lower == \"started\" and ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'\n): 'dict object' has no attribute 'actions.runner.org-name.gha-runner.service'\n\nThe error appears to be in 'MY_REPO_PATH/roles/MonolithProjects.github_actions_runner/tasks/install_runner.yml': line 122, 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: START and enable Github Actions Runner service (Linux) # noqa no-changed-when\n ^ here\n"}