Skip to content

Commit eb202fc

Browse files
Merge pull request #71 from MonolithProjects/main
Mysterious Ansible Galaxy issue
2 parents ec2d44c + 6ac5013 commit eb202fc

35 files changed

+360
-407
lines changed

CONTRIBUTING.md .github/CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ cd ansible-github_actions_runner
3131
molecule test
3232
```
3333

34+
> You will need to edit the files in `molecule/default` directory (please do not commit those changes)
35+
3436
## 5. Create a pull request
3537

3638
Please create a pull request into the `develop` branch. Here is [how to do it](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
3739

38-
3940
Please consider to [sponsor](https://github.com/sponsors/monolithprojects) me :-)

.github/PULL_REQUEST_TEMPLATE.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Pull Request Template
2+
3+
## Description
4+
5+
Please include a summary of the change and which issue is fixed.
6+
7+
## Type of change
8+
9+
Please delete options that are not relevant.
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] This change requires a documentation update
15+
16+
## How Has This Been Tested?
17+
18+
Please describe the tests that you ran to verify your changes.
19+
20+
## Destination branch
21+
22+
Create a PR into `develop` branch

.github/workflows/galaxy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
release:
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-20.04
1212
steps:
1313
- name: galaxy
1414
uses: robertdebock/[email protected]

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
types: [opened, synchronize, reopened]
1212
jobs:
1313
lint:
14-
runs-on: ubuntu-18.04
14+
runs-on: ubuntu-20.04
1515
strategy:
1616
fail-fast: true
1717
steps:
@@ -20,6 +20,6 @@ jobs:
2020
with:
2121
path: "${{ github.repository }}"
2222
- name: Molecule for Ansible - lint
23-
uses: MonolithProjects/[email protected].0
23+
uses: MonolithProjects/[email protected].1
2424
with:
2525
molecule_command: lint

.github/workflows/main.yml

+28-8
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,61 @@ name: molecule test
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- main
77
types: [opened, synchronize, reopened]
88
schedule:
99
- cron: '0 6 * * 0'
1010
jobs:
1111
repo:
1212
name: Test Repo Runner
13-
runs-on: ubuntu-18.04
13+
runs-on: ubuntu-20.04
1414
strategy:
15-
fail-fast: true
15+
fail-fast: false
16+
matrix:
17+
config:
18+
- os: "centos7"
19+
tag: "latest"
20+
- os: "centos8"
21+
tag: "latest"
22+
- os: "debian9"
23+
tag: "latest"
24+
- os: "debian10"
25+
tag: "latest"
26+
- os: "fedora33"
27+
tag: "latest"
28+
- os: "ubuntu18"
29+
tag: "latest"
30+
- os: "ubuntu20"
31+
tag: "latest"
1632
steps:
1733
- name: checkout
1834
uses: actions/checkout@v2
1935
with:
2036
path: "${{ github.repository }}"
2137
- name: Molecule for Ansible - GHR Repository
22-
uses: MonolithProjects/[email protected].0
38+
uses: MonolithProjects/[email protected].1
2339
env:
2440
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
2541
with:
42+
os: ${{ matrix.config.os }}
43+
tag: ${{ matrix.config.tag }}
2644
molecule_command: test
45+
scenario: repo
46+
2747
org:
2848
name: Test Org Runner
29-
runs-on: ubuntu-18.04
49+
runs-on: ubuntu-20.04
3050
strategy:
31-
fail-fast: true
51+
fail-fast: false
3252
steps:
3353
- name: checkout
3454
uses: actions/checkout@v2
3555
with:
3656
path: "${{ github.repository }}"
3757
- name: Molecule for Ansible - GHR Organization
38-
uses: MonolithProjects/[email protected].0
58+
uses: MonolithProjects/[email protected].1
3959
env:
4060
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
4161
with:
4262
molecule_command: test
43-
scenario: organization
63+
scenario: org

README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[![Galaxy Quality](https://img.shields.io/ansible/quality/47375?style=flat&logo=ansible)](https://galaxy.ansible.com/monolithprojects/github_actions_runner)
55
[![Role version](https://img.shields.io/github/v/release/MonolithProjects/ansible-github_actions_runner)](https://galaxy.ansible.com/monolithprojects/github_actions_runner)
66
[![Role downloads](https://img.shields.io/ansible/role/d/47375)](https://galaxy.ansible.com/monolithprojects/github_actions_runner)
7-
[![GitHub Actions](https://github.com/MonolithProjects/ansible-github_actions_runner/workflows/molecule%20test/badge.svg?branch=master)](https://github.com/MonolithProjects/ansible-github_actions_runner/actions)
8-
[![License](https://img.shields.io/github/license/MonolithProjects/ansible-github_actions_runner)](https://github.com/MonolithProjects/ansible-github_actions_runner/blob/master/LICENSE)
7+
[![GitHub Actions](https://github.com/MonolithProjects/ansible-github_actions_runner/workflows/molecule%20test/badge.svg?branch=main)](https://github.com/MonolithProjects/ansible-github_actions_runner/actions)
8+
[![License](https://img.shields.io/github/license/MonolithProjects/ansible-github_actions_runner)](https://github.com/MonolithProjects/ansible-github_actions_runner/blob/main/LICENSE)
99

1010

1111
This role will deploy/redeploy/uninstall and register/unregister local GitHub Actions Runner.
@@ -32,7 +32,7 @@ Personal Access Token for GitHub account can be created [here](https://github.co
3232

3333
* ARM, ARM64 (dependencies installation is not covered by this role)
3434
* AMD64, x86_64
35-
## Weekly tested on:
35+
## Tested on:
3636

3737
* CentOS/RHEL 7,8
3838
* Debian 9,10
@@ -83,7 +83,7 @@ runner_org: no
8383
runner_name: "{{ ansible_hostname }}"
8484

8585
# Labels to apply to the runner
86-
runner_labels: "''"
86+
runner_labels: []
8787

8888
# Custom service name when usign Github Enterprise server
8989
# service_name: actions.runner._services.{{ runner_name }}.service
@@ -131,8 +131,8 @@ Same example as above, but runner will be added to an organization.
131131
- role: monolithprojects.github_actions_runner
132132
```
133133
134-
In this example the Ansible role will deploy (or update) the GitHub Actions runner service (version 2.165.2) and register the runner for the GitHub repo. Runner service will run under the user `runner-user`.
135-
The runner service will be *stopped*.
134+
In this example the Ansible role will deploy (or update) the GitHub Actions runner service (version 2.165.2) and register the runner for the GitHub repo. Runner service will run under the user `runner-user`. Runner will be registered with two labels.
135+
The runner service will be *stopped* and disabled.
136136

137137
```yaml
138138
---
@@ -145,6 +145,9 @@ The runner service will be *stopped*.
145145
- github_account: github-access-user
146146
- github_repo: my_awesome_repo
147147
- runner_state: "stopped"
148+
- runner_labels:
149+
- production
150+
- west
148151
roles:
149152
- role: monolithprojects.github_actions_runner
150153
```

defaults/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ runner_org: no
3636
runner_name: "{{ ansible_hostname }}"
3737

3838
# Labels to apply to the runner
39-
runner_labels: "''"
39+
runner_labels: []
4040

4141
# Custom service name when usign Github Enterprise server
4242
# service_name: actions.runner._services.{{ runner_name }}.service

handlers/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# handlers file for ansible-github_actions_runner
2+
# handlers file for ansible-github_actions_runner (currently not used)
33
- name: Restart runner service
44
service:
55
name: "{{ runner_service }}"

meta/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
galaxy_info:
33
author: Michal Muransky
4-
role_name: Github_Actions_runner
4+
role_name: github_actions_runner
55
description: Deploy Github Actions private runner
66
company: MonolithProjects
77
license: "license (MIT)"

molecule/default/Dockerfile.j2

-31
This file was deleted.

molecule/default/INSTALL.rst

-22
This file was deleted.

molecule/default/cleanup.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
vars:
77
- runner_user: ansible
88
- github_repo: ansible-github_actions_runner-testrepo
9-
- github_account: monolithprojects
9+
- github_account: monolithprojects-testorg
1010
- runner_state: absent
1111
roles:
1212
- ansible-github_actions_runner

molecule/default/converge.yml

+5-17
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
---
2-
- name: Install
2+
- name: Dev test playbook
33
user: ansible
44
hosts: all
55
gather_facts: yes
66
become: yes
77
vars:
88
- runner_user: ansible
99
- github_repo: ansible-github_actions_runner-testrepo
10-
- github_account: monolithprojects
11-
- runner_version: "latest"
12-
- reinstall_runner: yes
13-
roles:
14-
- robertdebock.epel
15-
- ansible-github_actions_runner
16-
17-
- name: Idempotence test
18-
user: ansible
19-
hosts: all
20-
become: yes
21-
gather_facts: yes
22-
vars:
23-
- runner_user: ansible
24-
- github_repo: ansible-github_actions_runner-testrepo
25-
- github_account: monolithprojects
10+
- github_account: monolithprojects-testorg
2611
- runner_version: "latest"
12+
- runner_labels:
13+
- label1
14+
- repo-runner
2715
roles:
2816
- robertdebock.epel
2917
- ansible-github_actions_runner

0 commit comments

Comments
 (0)