MonolithProjects / ansible-github_actions_runner

Ansible Role to deploy GitHub Actions self-hosted runner
https://galaxy.ansible.com/ui/standalone/roles/monolithprojects/github_actions_runner/
MIT License
189 stars 77 forks source link

bug: Step "Update runner labels if changed" reports OK even when labels change. #226

Open connorhsm opened 4 days ago

connorhsm commented 4 days ago

Summary

When the variable "runner_labels" provided to the role changes, and running ansible-playbook causes the configuration in GitHub to change, the step "Update runner labels if changed" still reports OK when I would expect it to report Changed.

Issue Type

Bug Report

Ansible Version

ansible [core 2.17.6]
  config file = /Users/REDACTED/action_runner/ansible.cfg
  configured module search path = ['/Users/REDACTED/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/REDACTED/action_runner/.venv/lib/python3.13/site-packages/ansible
  ansible collection location = /Users/REDACTED/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/REDACTED/action_runner/.venv/bin/ansible
  python version = 3.13.0 (main, Oct  7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.3)] (/Users/REDACTED/action_runner/.venv/bin/python)
  jinja version = 3.1.4
  libyaml = True

Steps to Reproduce


- name: GHA runner configuration
  hosts: all
  become: true
  vars:
    ...
    runner_labels: ["test", "test2"]
  roles:
    - role: monolithprojects.github_actions_runner

Expected Results

I expect the task to report Changed if changes are made to the labels.

Actual Results

The task is actually reporting Ok when changes are made.