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

Cannot register multiple runners for the same org. #9

Open
nagarutu opened this issue Oct 8, 2023 · 2 comments
Open

Cannot register multiple runners for the same org. #9

nagarutu opened this issue Oct 8, 2023 · 2 comments

Comments

@nagarutu
Copy link

nagarutu commented Oct 8, 2023

I was trying to create multiple github runnner for an Org, using indididual repo keys,

- name: Install Runner1 on github-runners-ubuntu
  hosts: github-runners-ubuntu

  roles:
    - role: ansible-github-actions-runner
      vars:
        gh_runner_config_labels:
          - ubuntu22
          - linux
          - self-hosted
        gh_runner_config_url: https://github.com/acme.net
        gh_runner_config_token: APERFECTLYFINETOKEN
        gh_runner_config_name: ubuntu-runner1
        gh_runner_allow_runasroot: "Refuse"

    - role: ansible-github-actions-runner
      vars:
        gh_runner_config_labels:
          - ubuntu22
          - linux
          - self-hosted
        gh_runner_config_url: https://github.com/acme.net
        gh_runner_config_token: ANOTHERPERFECTLYFINETOKEN
        gh_runner_config_name: ubuntu-runner2
        gh_runner_allow_runasroot: "Refuse"

I expected this to create two runners for on the host and that they both would be online.
Instead it replaced the first runner with the second one.
image

Ive been looking at the code to understand why its replacing the existing one instead of generating a separate one, but Im not able to figure it out as of yet so figured Id put in an Issue.

@nagarutu
Copy link
Author

nagarutu commented Oct 8, 2023

It seems that If i keep the runners in separate folders by specifying the path for each runner with:
gh_runner_installation_path

This seems to solve the situation for me.

@vaxxor
Copy link

vaxxor commented Aug 7, 2024

It seems that If i keep the runners in separate folders by specifying the path for each runner with: gh_runner_installation_path

This seems to solve the situation for me.

Adding to this, I had to also set 'gh_runner_workspace_path' to be unique for every runner, otherwise i sometime got error for missing files in '/var/cache/github-actions-runner' folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants