Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit af60193

Browse files
committed
Add ability to disable automatic updates
1 parent 397b12f commit af60193

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
# * no_proxy
5656
# Optional[String], Comma separated list of hosts that should not use a proxy. More information at https://docs.github.com/en/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners
5757
#
58+
# * disable_update
59+
# Optional[Boolean], toggle for disabling automatic runner updates.
60+
#
5861
# * path
5962
# Optional[Array[String]], List of paths to be used as PATH env in the instance runner.
6063
# If not defined, file ".path" will be kept as created by the runner scripts. Default value: undef
@@ -81,6 +84,7 @@
8184
Optional[String[1]] $http_proxy = undef,
8285
Optional[String[1]] $https_proxy = undef,
8386
Optional[String[1]] $no_proxy = undef,
87+
Optional[Boolean] $disable_update = undef,
8488
Optional[Array[String]] $path = undef,
8589
Optional[Hash[String, String]] $env = undef,
8690
) {

manifests/instance.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
# * no_proxy
3636
# Optional[String], Comma separated list of hosts that should not use a proxy. More information at https://docs.github.com/en/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners
3737
#
38+
# * disable_update
39+
# Optional[Boolean], toggle for disabling automatic runner updates.
40+
#
3841
# * repo_name
3942
# Optional[String], actions runner repository name.
4043
#
@@ -62,6 +65,7 @@
6265
Optional[String[1]] $http_proxy = $github_actions_runner::http_proxy,
6366
Optional[String[1]] $https_proxy = $github_actions_runner::https_proxy,
6467
Optional[String[1]] $no_proxy = $github_actions_runner::no_proxy,
68+
Optional[Boolean] $disable_update = $github_actions_runner::disable_update,
6569
Optional[Array[String[1]]] $labels = undef,
6670
Optional[String[1]] $enterprise_name = $github_actions_runner::enterprise_name,
6771
Optional[String[1]] $org_name = $github_actions_runner::org_name,
@@ -135,6 +139,7 @@
135139
url => $url,
136140
hostname => $hostname,
137141
assured_labels => $assured_labels,
142+
disableupdate => $disableupdate,
138143
}),
139144
notify => Exec["${instance_name}-run_configure_install_runner.sh"],
140145
require => Archive["${instance_name}-${archive_name}"],

templates/configure_install_runner.sh.epp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
String $url,
66
String $hostname,
77
String $assured_labels,
8+
Boolean $disable_update,
89
| -%>
910
#!/bin/bash
1011
# Configure the action runner after the package file has been downloaded.
@@ -32,6 +33,9 @@ export RUNNER_ALLOW_RUNASROOT=true
3233
--name <%= $hostname %>-<%= $instance_name %> \
3334
--url <%= $url %> \
3435
--token ${TOKEN} \
36+
<%- if $disable_update { -%>
37+
--disableupdate \
38+
<%- } -%>
3539
<%= $assured_labels %> &>/dev/null
3640

3741
# Copy service endpoint script.

0 commit comments

Comments
 (0)