Skip to content

Commit 68d961c

Browse files
Merge pull request #216 from MonolithProjects/develop
Develop to Master
2 parents eea7313 + a61fae1 commit 68d961c

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ It supports Enterprise, Organization and Repository Runners.
1212

1313
## Role Installation
1414

15-
Since Ansible Galaxy migrated to Galaxy-ng my galaxy account seems to be broken and RedHat/Galaxy support team just [deos not care](https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176). Please install this role directly fom GitHub.
16-
1715
**requirements.yml**
1816
```yml
1917
roles:
@@ -119,6 +117,9 @@ runner_extra_config_args: ""
119117
# Name to assign to this runner in GitHub (System hostname as default)
120118
runner_name: "{{ ansible_facts.hostname }}"
121119

120+
# Set to false when provisioning runners for more than one repository within single play
121+
all_runners_in_same_repo: true
122+
122123
# GitHub Repository user or Organization owner used for Runner registration
123124
# github_account: "youruser"
124125

@@ -292,7 +293,7 @@ cd path/to/monolithprojects.github_actions_runner
292293
```bash
293294
export PERSONAL_ACCESS_TOKEN=your_github_pat # Your Personal Access Token to Github
294295
export GITHUB_ACCOUNT=your_account # Your Github Account
295-
export GITHUB_ACCOUNT=your_repository # Github Repository where you want to setup the Runner
296+
export GITHUB_REPO=your_repository # Github Repository where you want to setup the Runner
296297
```
297298

298299
3. Run Molecule:

defaults/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ runner_extra_config_args: ""
4848
# Name to assign to this runner in GitHub (System hostname as default)
4949
runner_name: "{{ ansible_facts.hostname }}"
5050

51+
# Set to false when provisioning runners for more than one repository within single play
52+
all_runners_in_same_repo: true
53+
5154
# GitHub Repository user or Organization owner used for Runner registration
5255
# github_account: "youruser"
5356

tasks/collect_info.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
register: registration
3030
run_once: true
3131

32-
- name: Check currently registered runners for repo (RUN ONCE)
32+
- name: "Check currently registered runners for repo {{ '(RUN ONCE)' if all_runners_in_same_repo else '' }}"
3333
ansible.builtin.uri:
3434
url: "{{ github_full_api_url }}"
3535
headers:
@@ -42,7 +42,7 @@
4242
status_code: 200
4343
force_basic_auth: true
4444
register: registered_runners
45-
run_once: true
45+
run_once: "{{ all_runners_in_same_repo }}"
4646

4747
- name: Get Runner User IDs
4848
ansible.builtin.command: id -u "{{ runner_user }}"

0 commit comments

Comments
 (0)