File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 4
4
hosts : all
5
5
become : yes
6
6
vars :
7
+ - runner_version : " 2.168.0"
7
8
- runner_user : ansible
8
9
- github_repo : ansible-github_actions_runner-testrepo
9
10
- github_account : monolithprojects
Original file line number Diff line number Diff line change 10
10
tags :
11
11
- install
12
12
13
- - name : Find the lates runner version
13
+ - name : Find the latest runner version
14
14
uri :
15
15
url : " https://api.github.com/repos/actions/runner/releases/latest"
16
+ url_username : " {{ github_account }}"
17
+ url_password : " {{ access_token }}"
16
18
method : GET
17
19
force_basic_auth : yes
18
20
return_content : yes
19
21
status_code : 200
20
22
body_format : json
21
23
register : api_response
22
- # run_once: yes
23
- # delegate_to: localhost
24
+ run_once : yes
25
+ delegate_to : localhost
24
26
when : runner_version == "latest"
25
27
tags :
26
28
- install
27
29
28
- - name : Set runner_version variable ("{{ api_response.json.tag_name | regex_replace('^v', '') }}" )
30
+ - name : Set runner_version variable (if it is latest )
29
31
set_fact :
30
32
runner_version : " {{ api_response.json.tag_name | regex_replace('^v', '') }}"
31
33
when : runner_version == "latest"
You can’t perform that action at this time.
0 commit comments