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
+
# GitHub Repository user or Organization owner used for Runner registration
67
68
# github_account: "youruser"
68
69
69
70
# Github repository name
@@ -72,12 +73,12 @@ runner_org: no
72
73
73
74
## Example Playbook
74
75
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*).
76
+
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.
77
+
Runner service will be stated and will run under the same user as the Ansible is using for ssh connection (*ansible*).
77
78
78
79
```yaml
79
80
---
80
-
- name: GitHub Actions Runner
81
+
- name: Install GitHub Actions Runner
81
82
hosts: all
82
83
user: ansible
83
84
become: yes
@@ -88,11 +89,11 @@ Runner service will run under the same user as the Ansible is using for ssh conn
88
89
- role: monolithprojects.github_actions_runner
89
90
```
90
91
91
-
Same example, but runner will be added to an organization
92
+
Same example as above, but runner will be added to an organization.
92
93
93
94
```yaml
94
95
---
95
-
- name: GitHub Actions Runner
96
+
- name: Install GitHub Actions Runner
96
97
hosts: all
97
98
user: ansible
98
99
become: yes
@@ -103,26 +104,37 @@ Same example, but runner will be added to an organization
103
104
- role: monolithprojects.github_actions_runner
104
105
```
105
106
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`.
107
+
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`.
108
+
The runner service will be *stopped*.
107
109
108
110
```yaml
109
111
---
110
-
- name: GitHub Actions Runner
112
+
- name: Stop GitHub Actions Runner
111
113
hosts: all
112
114
become: yes
113
115
vars:
114
116
- runner_version: "2.165.2"
115
117
- runner_user: runner-user
116
118
- github_account: github-access-user
117
119
- github_repo: my_awesome_repo
120
+
- runner_state: "stopped"
118
121
roles:
119
122
- role: monolithprojects.github_actions_runner
120
123
```
121
124
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.
125
+
In this example the Ansible role will uninstall the runner service and unregister it from the GitHub Repository.
0 commit comments