{"id":19892595,"url":"https://github.com/compscidr/ansible-github-runner","last_synced_at":"2025-09-11T08:35:00.503Z","repository":{"id":229089425,"uuid":"775610221","full_name":"compscidr/ansible-github-runner","owner":"compscidr","description":"Installs a github self hosted runner","archived":false,"fork":false,"pushed_at":"2025-01-02T17:12:08.000Z","size":74,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T05:47:14.790Z","etag":null,"topics":["ansible","docker-container","github-actions","runner","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"YAML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compscidr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-21T17:52:27.000Z","updated_at":"2025-01-02T17:11:52.000Z","dependencies_parsed_at":"2024-04-10T19:47:18.228Z","dependency_job_id":"2830de15-1c5f-4f7a-98ab-d5f4a4c97b16","html_url":"https://github.com/compscidr/ansible-github-runner","commit_stats":null,"previous_names":["compscidr/ansible-github-runner"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fansible-github-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fansible-github-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fansible-github-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fansible-github-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compscidr","download_url":"https://codeload.github.com/compscidr/ansible-github-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233530318,"owners_count":18689980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","docker-container","github-actions","runner","self-hosted"],"created_at":"2024-11-12T18:24:21.845Z","updated_at":"2025-09-11T08:35:00.486Z","avatar_url":"https://github.com/compscidr.png","language":"YAML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-github-runner\n[![Static Badge](https://img.shields.io/badge/Ansible_galaxy-Download-blue)](https://galaxy.ansible.com/ui/repo/published/compscidr/github_runner/)\n[![ansible lint](https://github.com/compscidr/ansible-github-runner/actions/workflows/check.yml/badge.svg)](https://github.com/compscidr/ansible-github-runner/actions/workflows/check.yml)\n[![ansible lint rules](https://img.shields.io/badge/Ansible--lint-rules%20table-blue.svg)](https://ansible.readthedocs.io/projects/lint/rules/)\n\nInstalls a github self hosted runner within a docker container.\n\nThis is done so we don't need to recreate the work done for\ndownloading, installing, configuring and running the runner\nas a deamon directly on the host system.\n\nWe make use of: [https://github.com/myoung34/docker-github-actions-runner](https://github.com/myoung34/docker-github-actions-runner)\nfor a runner without java / android, or [https://github.com/compscidr/docker-github-actions-runner-android](https://github.com/compscidr/docker-github-actions-runner-android)\nfor a runner with java / android.\n\nThis is a collection instead of a role because it has a collection\ndependency on the ansible community docker collection in order\nto install the runner with a docker container.\n\n## Usage\nSee the docs at [roles/github_runner](roles/github_runner) for more details\n\nAdd the collection to your meta/requirements.yml:\n```\ncollections:\n    - name: compscidr.github_runner\n        version: \"\u003cinsert version here\u003e\"\n```\n\nInstall the collection:\n```\nansible-galaxy install -r meta/requirements.yml\n```\n\nUse in a playbook:\n```\n---\n- name: Github Runners\n    hosts: some_hosts\n    vars_files:\n        - vars/some_vars.yml\n    roles:\n        - role: compscidr.github_runner.github_runner\n            vars:\n                github_runner_name: \"some-runner-name\"\n                github_runner_java: true\n                github_runner_install_docker: false\n                github_runner_java_mount_usb: true\n                github_runner_repo: \"my_repo\"\n        - role: compscidr.github_runner.github_runner\n            vars:\n                github_runner_name: \"some-org\"\n                github_runner_java: true\n                github_runner_install_docker: false\n                github_runner_java_mount_usb: true\n                github_runner_org: true\n                github_runner_org_name: \"my-org\"\n```\n\n# Variables\nVariable                                | Description\n--------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\ngithub_runner_install_docker            | Set to true to install docker with the nickjj.docker role (defaults to true)\ngithub_runner_personal_access_token     | GH personal access toke, see: https://github.com/myoung34/docker-github-actions-runner/wiki/Usage#token-scope for permissions needed\ngithub_runner_name                      | the name for the runner (will show up in GH to differentiate runners)\ngithub_runner_repo: user-name/repo      | the repo for the runner (ignored if an org runner)\ngithub_runner_labels: self-hosted       | labels to attach to the runner (comma separated)\ngithub_runner_org: false                | true for org runner, false for repo runner\ngithub_runner_org_name: org name        | org name if an org runner, otherwise ignored\ngithub_runner_java: false               | whether to use an android / java runner image or not\ngithub_runner_java_mount_usb: false     | whether to mount usb (for instance if running tests on actual phones)\ngithub_runner_java_image: compscidr/github-runner-android:latest | the java / android runner image\ngithub_runner_non_java_image: myoung34/github-runner:latest | the non-java/android runner image\ngithub_runner_env_file: false           | env file for passing extra environment variables into the runner container\ngithub_runner_env_filename: \".env\"      | the filename of the env file for passing extra environment variables into the container\ngithub_runner_github_host: \"github.com\" | The GITHUB_HOST used for registering the runner.\n\nNotes: the env file lets you do things like set site-specific credentials into the runner that can be built into the code\nat build time, for instance, Wi-Fi credentials that can be built into tests that are specific to the location of\nwhere the runner container is located.\n\n## Testing\nUsing a clean slate vagrant ubuntu vm from the vagrant folder run `vagrant up` and then\nuse `vagrant ssh` to get into the machine, then `ansible-playbook playbooks/github_actions.yml`\n\nIf changes are made, you can re-run: `ansible-galaxy collection build --force` and\n`ansible-galaxy collection install *tar.gz --force`\n\n## Inspiration\n* [https://github.com/macunha1/ansible-github-actions-runner](https://github.com/macunha1/ansible-github-actions-runner)\n* [https://github.com/buluma/ansible-collection-roles](https://github.com/buluma/ansible-collection-roles)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Fansible-github-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompscidr%2Fansible-github-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Fansible-github-runner/lists"}