File tree Expand file tree Collapse file tree 8 files changed +34
-40
lines changed Expand file tree Collapse file tree 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') }}"
4545# Directory where the local runner will be installed
4646runner_dir : /opt/actions-runner
4747
48+ # Directory where the runner package will be dowloaded
49+ runner_pkg_tempdir : /tmp/gh_actions_runner
50+
4851# Version of the GitHub Actions Runner
4952runner_version : " latest"
5053
5154# State in which the runner service will be after the role is done (started, stopped, absent)
5255runner_state : " started"
5356
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
5558reinstall_runner : no
5659
5760# Do not show Ansible logs which may contain sensitive data (registration token)
@@ -63,10 +66,10 @@ github_server: "https://github.com"
6366# Personal Access Token for your GitHub account
6467access_token : " {{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
6568
66- # Is it the runner for organization or not
69+ # Is it the runner for organization or not?
6770runner_org : no
6871
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)
7073runner_name : " {{ ansible_hostname }}"
7174
7275# 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') }}"
55# Directory where the local runner will be installed
66runner_dir : /opt/actions-runner
77
8+ # Directory where the runner package will be dowloaded
9+ runner_pkg_tempdir : /tmp/gh_actions_runner
10+
811# Version of the GitHub Actions Runner
912runner_version : " latest"
1013
1114# State in which the runner service will be after the role is done (started, stopped, absent)
1215runner_state : " started"
1316
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
1518reinstall_runner : no
1619
1720# Do not show Ansible logs which may contain sensitive data (registration token)
@@ -23,10 +26,10 @@ github_server: "https://github.com"
2326# Personal Access Token for your GitHub account
2427access_token : " {{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"
2528
26- # Is it the runner for organization or not
29+ # Is it the runner for organization or not?
2730runner_org : no
2831
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)
3033runner_name : " {{ ansible_hostname }}"
3134
3235# GitHub Repository user or Organization owner used for Runner registration
Original file line number Diff line number Diff line change 22- name : Install
33 user : ansible
44 hosts : all
5+ gather_facts : yes
56 become : yes
67 vars :
78 - runner_user : ansible
89 - github_repo : ansible-github_actions_runner-testrepo
910 - github_account : monolithprojects
1011 - runner_version : " latest"
12+ - reinstall_runner : yes
1113 roles :
1214 - robertdebock.epel
1315 - ansible-github_actions_runner
1618 user : ansible
1719 hosts : all
1820 become : yes
21+ gather_facts : yes
1922 vars :
2023 - runner_user : ansible
2124 - github_repo : ansible-github_actions_runner-testrepo
Original file line number Diff line number Diff line change @@ -101,18 +101,6 @@ provisioner:
101101 converge : converge.yml
102102 cleanup : cleanup.yml
103103 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
116104verifier :
117105 name : testinfra
118106 directory : tests
Original file line number Diff line number Diff line change 11---
22- 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:
101101 converge : converge.yml
102102 cleanup : cleanup.yml
103103 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
116104verifier :
117105 name : testinfra
118106 directory : tests
Original file line number Diff line number Diff line change 11---
22- 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 4242 tags :
4343 - install
4444
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+
4556- name : Create temporary directory for archive
46- tempfile :
57+ file :
58+ path : " {{ runner_pkg_tempdir }}"
4759 state : directory
48- register : tempdir
60+ recurse : yes
61+ mode : ' 0777'
4962 run_once : yes
5063 delegate_to : localhost
5164 become : false
5669- name : Download runner package version - "{{ runner_version }}" (RUN ONCE)
5770 get_url :
5871 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"
6073 force : no
6174 run_once : yes
6275 become : false
6780
6881- name : Unarchive package
6982 unarchive :
70- src : " {{ tempdir.path }}/actions-runner-linux-{{ runner_version }}.tar.gz"
83+ src : " {{ runner_pkg_tempdir }}/actions-runner-linux-{{ runner_version }}.tar.gz"
7184 dest : " {{ runner_dir }}/"
7285 owner : " {{ runner_user }}"
7386 mode : 0755
You can’t perform that action at this time.
0 commit comments