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

Develop to Master #216

Merged
merged 4 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading