You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Account used for Runner registration (GitHub Repository user with admin rights or Organization owner)
67
+
# Name to assign to this runner in GitHub (hostname as default)
68
+
runner_name: "{{ lookup('pipe', 'hostname') }}"
69
+
70
+
# GitHub Repository user or Organization owner used for Runner registration
67
71
# github_account: "youruser"
68
72
73
+
# GitHub repository owner name (if other than github_account)
74
+
# github_owner: "yourorg"
75
+
69
76
# Github repository name
70
77
# github_repo: "yourrepo"
71
78
```
72
79
73
80
## Example Playbook
74
81
75
-
In this example the Ansible role will deploy (or redeploy) the GitHub Actions runner service (latest available version) and register the runner for the GitHub repo.
76
-
Runner service will run under the same user as the Ansible is using for ssh connection (*ansible*).
82
+
In this example the Ansible role will install (or update) the GitHub Actions Runner service (latest available version). The runner will be registered for *my_awesome_repo* GitHub repo.
83
+
Runner service will be stated and will run under the same user as the Ansible is using for ssh connection (*ansible*).
77
84
78
85
```yaml
79
86
---
80
-
- name: GitHub Actions Runner
87
+
- name: Install GitHub Actions Runner
81
88
hosts: all
82
89
user: ansible
83
90
become: yes
@@ -88,11 +95,11 @@ Runner service will run under the same user as the Ansible is using for ssh conn
88
95
- role: monolithprojects.github_actions_runner
89
96
```
90
97
91
-
Same example, but runner will be added to an organization
98
+
Same example as above, but runner will be added to an organization.
92
99
93
100
```yaml
94
101
---
95
-
- name: GitHub Actions Runner
102
+
- name: Install GitHub Actions Runner
96
103
hosts: all
97
104
user: ansible
98
105
become: yes
@@ -103,26 +110,37 @@ Same example, but runner will be added to an organization
103
110
- role: monolithprojects.github_actions_runner
104
111
```
105
112
106
-
In this example the Ansible role will deploy (or redeploy) 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`.
113
+
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`.
114
+
The runner service will be *stopped*.
107
115
108
116
```yaml
109
117
---
110
-
- name: GitHub Actions Runner
118
+
- name: Stop GitHub Actions Runner
111
119
hosts: all
112
120
become: yes
113
121
vars:
114
122
- runner_version: "2.165.2"
115
123
- runner_user: runner-user
116
124
- github_account: github-access-user
117
125
- github_repo: my_awesome_repo
126
+
- runner_state: "stopped"
118
127
roles:
119
128
- role: monolithprojects.github_actions_runner
120
129
```
121
130
122
-
By using tag `uninstall` with combination of variable `uninstall_runner: yes`, GitHub Actions runner will be removed from the host and unregistered from the GitHub repository.
131
+
In this example the Ansible role will uninstall the runner service and unregister it from the GitHub Repository.
0 commit comments