Coder Social home page Coder Social logo

macunha1 / ansible-github-actions-runner Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 7.0 25 KB

Idempotent Ansible role that installs and configures self-hosted GitHub Actions Runners (yeah, plural!)

License: MIT License

ansible ansible-role github-actions self-hosted-runner

ansible-github-actions-runner's People

Contributors

chrisavl avatar john-jam avatar macunha1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ansible-github-actions-runner's Issues

Cannot register multiple runners for the same org.

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.

De-register runner: must not run with sudo

Hi, thanks for this runner. I was able to create and register the runner but when I want to uninstall it, it says "must not run with sudo"

which config should I change so this step wont return error?
this is what I put into my yml

- hosts: all
  roles:
    - role: roles/macunha1.github_actions_runner
      vars:
        gh_runner_config_labels:
          - linux
          - self-hosted
        gh_runner_remove_host: true
        gh_runner_allow_runasroot: "0"
        gh_runner_config_url: some_repo
        gh_runner_config_token: some_token

Multiple operating systems

Hi,
This looks like a great ansible role!
I occasionally need to install a set of runners across multiple platforms: Linux, MacOS, Windows. There are multiple ways to add Windows, perhaps the easiest one would be in main.yml where there are three includes, add three more includes such as "../includes-win/install.yaml". Conditionally check on the operating system for all the includes. Would you be interested in a pull request which adds such functionality? Another option is less integrated. Clone the role, modify everything to support (only) windows. Then there are two separate Ansible roles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.