Skip to content

Commit

Permalink
Merge pull request #216 from MonolithProjects/develop
Browse files Browse the repository at this point in the history
Develop to Master
  • Loading branch information
MonolithProjects authored Aug 10, 2024
2 parents eea7313 + a61fae1 commit 68d961c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ It supports Enterprise, Organization and Repository Runners.

## Role Installation

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.

**requirements.yml**
```yml
roles:
Expand Down Expand Up @@ -119,6 +117,9 @@ runner_extra_config_args: ""
# Name to assign to this runner in GitHub (System hostname as default)
runner_name: "{{ ansible_facts.hostname }}"

# Set to false when provisioning runners for more than one repository within single play
all_runners_in_same_repo: true

# GitHub Repository user or Organization owner used for Runner registration
# github_account: "youruser"

Expand Down Expand Up @@ -292,7 +293,7 @@ cd path/to/monolithprojects.github_actions_runner
```bash
export PERSONAL_ACCESS_TOKEN=your_github_pat # Your Personal Access Token to Github
export GITHUB_ACCOUNT=your_account # Your Github Account
export GITHUB_ACCOUNT=your_repository # Github Repository where you want to setup the Runner
export GITHUB_REPO=your_repository # Github Repository where you want to setup the Runner
```

3. Run Molecule:
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ runner_extra_config_args: ""
# Name to assign to this runner in GitHub (System hostname as default)
runner_name: "{{ ansible_facts.hostname }}"

# Set to false when provisioning runners for more than one repository within single play
all_runners_in_same_repo: true

# GitHub Repository user or Organization owner used for Runner registration
# github_account: "youruser"

Expand Down
4 changes: 2 additions & 2 deletions tasks/collect_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
register: registration
run_once: true

- name: Check currently registered runners for repo (RUN ONCE)
- name: "Check currently registered runners for repo {{ '(RUN ONCE)' if all_runners_in_same_repo else '' }}"
ansible.builtin.uri:
url: "{{ github_full_api_url }}"
headers:
Expand All @@ -42,7 +42,7 @@
status_code: 200
force_basic_auth: true
register: registered_runners
run_once: true
run_once: "{{ all_runners_in_same_repo }}"

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

0 comments on commit 68d961c

Please sign in to comment.