Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Replace registered runner for organization step is missing from install_runner.yml #207

Closed
samgiz opened this issue May 10, 2024 · 1 comment · Fixed by #208
Closed
Labels
bug Something isn't working

Comments

@samgiz
Copy link

samgiz commented May 10, 2024

Summary

The Replace registered runner for organization step step used to exist and got removed in this commit, even though that change isn't mentioned in the commit message.

I'm assuming that was an accidental removal. I don't see a reason to have a Replace registered runner step for repos but not organizations, and I don't think it's currently possible to re-register an organization runner.

Issue Type

Bug Report

Ansible Version

1.15.0 and later.

Steps to Reproduce

I'm not knowledgable enough about ansible to quickly set up a full small reproducer. I have something similar to the following snippet in my config:

- name: Configure the runner
  ansible.builtin.include_role:
    name: github_actions_runner
    apply:
      become: true
  vars:
    reinstall_runner: true
    runner_org: true

Expected Results

I would expect the runner to be reinstalled when reinstall_runner is true.

Actual Results

It doesn't get reinstalled, because it never gets reinstalled for organization runners as currently written.

TASK [github_actions_runner : Set complete GitHub url for enterprise runner] **************************
skipping: [xxx]

TASK [github_actions_runner : Register runner] ********************************************************
skipping: [xxx]
@samgiz samgiz added the bug Something isn't working label May 10, 2024
@samgiz samgiz changed the title bug: Replace registered runner for organization ste bug: Replace registered runner for organization step is missing May 10, 2024
@samgiz samgiz changed the title bug: Replace registered runner for organization step is missing bug: Replace registered runner for organization step is missing May 10, 2024
@samgiz samgiz changed the title bug: Replace registered runner for organization step is missing bug: Replace registered runner for organization step is missing from install_runner.yml May 10, 2024
@samgiz
Copy link
Author

samgiz commented May 13, 2024

After another look I now see that the two Replace registered runner steps were merged together, but the condition from Replace registered runner for repo was kept. Presumably the fix is just removing the and not runner_org bit from the Replace registered runner step.

Troels51 added a commit to Troels51/ansible-github_actions_runner that referenced this issue May 14, 2024
When replacing an existing runner, it makes no sense to restrict it
to not run on org runners. This commit removes that requirement

closes: MonolithProjects#207
lewismiddleton added a commit to lewismiddleton/ansible-github_actions_runner that referenced this issue May 14, 2024
This removes a condition from the 'Replace registered runner' task to
allow it to replace organisation runners.

Resolves MonolithProjects#207
Resolves MonolithProjects#145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant