Skip to content

Commit db3b11a

Browse files
Merge pull request #7 from MonolithProjects/develop
Ubuntu tested Former-commit-id: c64d5ff
2 parents f8ab389 + 86b9e73 commit db3b11a

File tree

6 files changed

+51
-29
lines changed

6 files changed

+51
-29
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,8 @@ on:
77
- develop
88
schedule:
99
- cron: '0 6 * * 0'
10-
1110
jobs:
12-
lint:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: checkout
16-
uses: actions/checkout@v2
17-
- name: molecule
18-
uses: robertdebock/[email protected]
19-
with:
20-
entrypoint: /usr/local/bin/molecule
21-
args: lint
2211
test:
23-
needs:
24-
- lint
2512
runs-on: ubuntu-latest
2613
strategy:
2714
fail-fast: false
@@ -34,3 +21,21 @@ jobs:
3421
uses: robertdebock/[email protected]
3522
env:
3623
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
24+
# uninstall:
25+
# needs:
26+
# - test
27+
# runs-on: ubuntu-latest
28+
# strategy:
29+
# fail-fast: false
30+
# steps:
31+
# - name: checkout
32+
# uses: actions/checkout@v2
33+
# with:
34+
# path: "${{ github.repository }}"
35+
# - name: molecule
36+
# uses: robertdebock/[email protected]
37+
# with:
38+
# entrypoint: /usr/local/bin/molecule
39+
# optionst: "converge -- --tags uninstall"
40+
# env:
41+
# PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@ This role will deploy or redeploy or uninstall and register or unregister local
1212
Requirements
1313
------------
1414

15-
System must have access to the GitHub.
15+
* Supported Linux distros:
16+
* CentOS/RHEL 7,8
17+
* Fedora 16+
18+
* Ubuntu 16,17
1619

17-
CentOS/Fedora systems require EPEL repository.
20+
* System must have access to the GitHub.
1821

19-
`PERSONAL_ACCESS_TOKEN` variable needs to be exported to your environment. The token has to have admin rights for the repo.
22+
* Runner user has to be pre-created.
23+
Recommended role: `monolithprojects.user_management`
24+
25+
* CentOS/Fedora systems require EPEL repository.
26+
Recommended role: `robertdebock.epel`
27+
28+
* `PERSONAL_ACCESS_TOKEN` variable needs to be exported to your environment. The token has to have admin rights for the repo.
2029
Personal Access Token for your GitHub account can be created [here](https://github.com/settings/tokens).
2130

2231
Role Variables
@@ -25,6 +34,9 @@ Role Variables
2534
This is a copy from `defaults/main.yml`
2635

2736
```yaml
37+
# Runner user - user inder which is the local runner service running
38+
runner_user: runner
39+
2840
# Directory where the local runner will be installed
2941
runner_dir: /opt/actions-runner
3042

@@ -75,11 +87,6 @@ By using tag `uninstall`, GitHub Actions runner will be removed from the host an
7587
ansible-playbook playbook.yml --tags uninstall
7688
```
7789

78-
ToDo
79-
----
80-
81-
Full Debian/Ubuntu support
82-
8390
License
8491
-------
8592

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
2+
# Runner user - user inder which is the local runner service running
3+
runner_user: runner
4+
25
# Directory where the local runner will be installed
36
runner_dir: /opt/actions-runner
47

meta/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
# versions:
1919
# - jessie
2020
# - stretch
21-
# - name: Ubuntu
22-
# versions:
23-
# - xenial
24-
# - bionic
21+
- name: Ubuntu
22+
versions:
23+
- xenial
24+
- bionic
2525
galaxy_tags:
2626
- github
2727
- actions

molecule/default/molecule.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ platforms:
1212
- /tmp
1313
volumes:
1414
- /sys/fs/cgroup:/sys/fs/cgroup:ro
15-
privileged: no
15+
privileged: yes
1616
pre_build_image: yes
1717
- name: CentOS8
1818
image: monolithprojects/systemd-centos8:latest
@@ -22,7 +22,7 @@ platforms:
2222
- /tmp
2323
volumes:
2424
- /sys/fs/cgroup:/sys/fs/cgroup:ro
25-
privileged: no
25+
privileged: yes
2626
pre_build_image: yes
2727
# - name: Ubuntu16
2828
# image: monolithprojects/systemd-ubuntu16:latest
@@ -32,7 +32,7 @@ platforms:
3232
# - /tmp
3333
# volumes:
3434
# - /sys/fs/cgroup:/sys/fs/cgroup:ro
35-
# privileged: no
35+
# privileged: yes
3636
# pre_build_image: yes
3737
# - name: Ubuntu18
3838
# image: monolithprojects/systemd-ubuntu18:latest
@@ -42,7 +42,7 @@ platforms:
4242
# - /tmp
4343
# volumes:
4444
# - /sys/fs/cgroup:/sys/fs/cgroup:ro
45-
# privileged: no
45+
# privileged: yes
4646
# pre_build_image: yes
4747
provisioner:
4848
name: ansible

tasks/uninstall_runner.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,12 @@
3939
become_user: "{{ runner_user }}"
4040
no_log: "{{ hide_sensitive_logs }}"
4141
when: ansible_hostname in registered_runners.json.runners|map(attribute='name')|list and runner_file.stat.exists
42+
tags:
43+
- uninstall
44+
45+
- name: Delete runner directory
46+
file:
47+
path: "{{ runner_dir }}"
48+
state: absent
4249
tags:
4350
- uninstall

0 commit comments

Comments
 (0)