diff --git a/README.md b/README.md index 9285602..d300c13 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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" @@ -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: diff --git a/defaults/main.yml b/defaults/main.yml index ea07a76..2c30cbc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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" diff --git a/tasks/collect_info.yml b/tasks/collect_info.yml index 17e8fd4..f017e27 100644 --- a/tasks/collect_info.yml +++ b/tasks/collect_info.yml @@ -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: @@ -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 }}"