File tree 8 files changed +34
-40
lines changed
8 files changed +34
-40
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,16 @@ runner_user: "{{ lookup('env','USER') }}"
45
45
# Directory where the local runner will be installed
46
46
runner_dir : /opt/actions-runner
47
47
48
+ # Directory where the runner package will be dowloaded
49
+ runner_pkg_tempdir : /tmp/gh_actions_runner
50
+
48
51
# Version of the GitHub Actions Runner
49
52
runner_version : " latest"
50
53
51
54
# State in which the runner service will be after the role is done (started, stopped, absent)
52
55
runner_state : " started"
53
56
54
- # If found on the server, delete already existed runner service before install
57
+ # If found on the server, delete already existing runner service and install it again
55
58
reinstall_runner : no
56
59
57
60
# Do not show Ansible logs which may contain sensitive data (registration token)
@@ -63,10 +66,10 @@ github_server: "https://github.com"
63
66
# Personal Access Token for your GitHub account
64
67
access_token : " {{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
65
68
66
- # Is it the runner for organization or not
69
+ # Is it the runner for organization or not?
67
70
runner_org : no
68
71
69
- # Name to assign to this runner in GitHub (hostname as default)
72
+ # Name to assign to this runner in GitHub (System hostname as default)
70
73
runner_name : " {{ ansible_hostname }}"
71
74
72
75
# GitHub Repository user or Organization owner used for Runner registration
Original file line number Diff line number Diff line change @@ -5,13 +5,16 @@ runner_user: "{{ lookup('env','USER') }}"
5
5
# Directory where the local runner will be installed
6
6
runner_dir : /opt/actions-runner
7
7
8
+ # Directory where the runner package will be dowloaded
9
+ runner_pkg_tempdir : /tmp/gh_actions_runner
10
+
8
11
# Version of the GitHub Actions Runner
9
12
runner_version : " latest"
10
13
11
14
# State in which the runner service will be after the role is done (started, stopped, absent)
12
15
runner_state : " started"
13
16
14
- # If found on the server, delete already existed runner service before install
17
+ # If found on the server, delete already existing runner service and install it again
15
18
reinstall_runner : no
16
19
17
20
# Do not show Ansible logs which may contain sensitive data (registration token)
@@ -23,10 +26,10 @@ github_server: "https://github.com"
23
26
# Personal Access Token for your GitHub account
24
27
access_token : " {{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
25
28
26
- # Is it the runner for organization or not
29
+ # Is it the runner for organization or not?
27
30
runner_org : no
28
31
29
- # Name to assign to this runner in GitHub (hostname as default)
32
+ # Name to assign to this runner in GitHub (System hostname as default)
30
33
runner_name : " {{ ansible_hostname }}"
31
34
32
35
# GitHub Repository user or Organization owner used for Runner registration
Original file line number Diff line number Diff line change 2
2
- name : Install
3
3
user : ansible
4
4
hosts : all
5
+ gather_facts : yes
5
6
become : yes
6
7
vars :
7
8
- runner_user : ansible
8
9
- github_repo : ansible-github_actions_runner-testrepo
9
10
- github_account : monolithprojects
10
11
- runner_version : " latest"
12
+ - reinstall_runner : yes
11
13
roles :
12
14
- robertdebock.epel
13
15
- ansible-github_actions_runner
16
18
user : ansible
17
19
hosts : all
18
20
become : yes
21
+ gather_facts : yes
19
22
vars :
20
23
- runner_user : ansible
21
24
- github_repo : ansible-github_actions_runner-testrepo
Original file line number Diff line number Diff line change @@ -101,18 +101,6 @@ provisioner:
101
101
converge : converge.yml
102
102
cleanup : cleanup.yml
103
103
log : false
104
- inventory :
105
- host_vars :
106
- CentOS8 :
107
- ansible_python_interpreter : /usr/bin/python3
108
- Debian9 :
109
- ansible_python_interpreter : /usr/bin/python3
110
- Debian10 :
111
- ansible_python_interpreter : /usr/bin/python3
112
- Ubuntu18 :
113
- ansible_python_interpreter : /usr/bin/python3
114
- Ubuntu20 :
115
- ansible_python_interpreter : /usr/bin/python3
116
104
verifier :
117
105
name : testinfra
118
106
directory : tests
Original file line number Diff line number Diff line change 1
1
---
2
2
- role : robertdebock.epel
3
- version : master
4
- # - role: monolithprojects.user_management
5
- # version: master
3
+ version : 2.5.4
Original file line number Diff line number Diff line change @@ -101,18 +101,6 @@ provisioner:
101
101
converge : converge.yml
102
102
cleanup : cleanup.yml
103
103
log : false
104
- inventory :
105
- host_vars :
106
- CentOS8 :
107
- ansible_python_interpreter : /usr/bin/python3
108
- Debian9 :
109
- ansible_python_interpreter : /usr/bin/python3
110
- Debian10 :
111
- ansible_python_interpreter : /usr/bin/python3
112
- Ubuntu18 :
113
- ansible_python_interpreter : /usr/bin/python3
114
- Ubuntu20 :
115
- ansible_python_interpreter : /usr/bin/python3
116
104
verifier :
117
105
name : testinfra
118
106
directory : tests
Original file line number Diff line number Diff line change 1
1
---
2
2
- role : robertdebock.epel
3
- version : master
4
- # - role: monolithprojects.user_management
5
- # version: master
3
+ version : 2.5.4
Original file line number Diff line number Diff line change 42
42
tags :
43
43
- install
44
44
45
+ # - name: Create temporary directory for archive
46
+ # tempfile:
47
+ # state: directory
48
+ # register: tempdir
49
+ # run_once: yes
50
+ # delegate_to: localhost
51
+ # become: false
52
+ # when: runner_version not in runner_installed.stdout
53
+ # tags:
54
+ # - install
55
+
45
56
- name : Create temporary directory for archive
46
- tempfile :
57
+ file :
58
+ path : " {{ runner_pkg_tempdir }}"
47
59
state : directory
48
- register : tempdir
60
+ recurse : yes
61
+ mode : ' 0777'
49
62
run_once : yes
50
63
delegate_to : localhost
51
64
become : false
56
69
- name : Download runner package version - "{{ runner_version }}" (RUN ONCE)
57
70
get_url :
58
71
url : " https://github.com/actions/runner/releases/download/v{{ runner_version }}/actions-runner-linux-x64-{{ runner_version }}.tar.gz"
59
- dest : " {{ tempdir.path }}/actions-runner-linux-{{ runner_version }}.tar.gz"
72
+ dest : " {{ runner_pkg_tempdir }}/actions-runner-linux-{{ runner_version }}.tar.gz"
60
73
force : no
61
74
run_once : yes
62
75
become : false
67
80
68
81
- name : Unarchive package
69
82
unarchive :
70
- src : " {{ tempdir.path }}/actions-runner-linux-{{ runner_version }}.tar.gz"
83
+ src : " {{ runner_pkg_tempdir }}/actions-runner-linux-{{ runner_version }}.tar.gz"
71
84
dest : " {{ runner_dir }}/"
72
85
owner : " {{ runner_user }}"
73
86
mode : 0755
You can’t perform that action at this time.
0 commit comments