File tree 4 files changed +10
-19
lines changed
4 files changed +10
-19
lines changed Original file line number Diff line number Diff line change 3
3
user : ansible
4
4
hosts : all
5
5
become : yes
6
- vars :
7
- - runner_user : ansible
8
- - github_repo : ansible-github_actions_runner-testrepo
9
- - github_account : monolithprojects
10
- roles :
11
- - role : ansible-github_actions_runner
12
-
13
- - name : Uninstall
14
- user : ansible
15
- hosts : all
16
- become : yes
17
- tags :
18
- - uninstall
19
6
vars :
20
7
- runner_user : ansible
21
8
- github_repo : ansible-github_actions_runner-testrepo
Original file line number Diff line number Diff line change @@ -46,9 +46,10 @@ platforms:
46
46
# pre_build_image: yes
47
47
provisioner :
48
48
name : ansible
49
+ playbooks :
50
+ converge : converge.yml
51
+ cleanup : cleanup.yml
49
52
log : false
50
- # env:
51
- # PERSONAL_ACCESS_TOKEN: $PERSONAL_ACCESS_TOKEN
52
53
inventory :
53
54
host_vars :
54
55
CentOS8 :
Original file line number Diff line number Diff line change 30
30
- install
31
31
32
32
- name : Register runner
33
- command : " {{ runner_dir }}/./config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} --token {{ registration.json.token }} --unattended"
33
+ command : " {{ runner_dir }}/./config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} \
34
+ --token {{ registration.json.token }} --unattended"
34
35
args :
35
36
chdir : " {{ runner_dir }}"
36
- # became : yes
37
+ become : yes
37
38
become_user : " {{ runner_user }}"
38
39
no_log : " {{ hide_sensitive_logs }}"
39
40
when : ansible_hostname not in registered_runners.json.runners|map(attribute='name')|list
40
41
tags :
41
42
- install
42
43
43
44
- name : Replace registered runner
44
- command : " {{ runner_dir }}/config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} --token {{ registration.json.token }} --unattended --replace"
45
+ command : " {{ runner_dir }}/config.sh --url {{ github_server }}/{{ github_account }}/{{ github_repo }} \
46
+ --token {{ registration.json.token }} --unattended --replace"
45
47
args :
46
48
chdir : " {{ runner_dir }}"
47
- # became : yes
49
+ become : yes
48
50
become_user : " {{ runner_user }}"
49
51
no_log : " {{ hide_sensitive_logs }}"
50
52
when : replace_runner and ansible_hostname in registered_runners.json.runners|map(attribute='name')|list
Original file line number Diff line number Diff line change 35
35
command : " ./config.sh remove --token {{ registration.json.token }} --unattended"
36
36
args :
37
37
chdir : " {{ runner_dir }}"
38
+ become : yes
38
39
become_user : " {{ runner_user }}"
39
40
no_log : " {{ hide_sensitive_logs }}"
40
41
when : ansible_hostname in registered_runners.json.runners|map(attribute='name')|list and runner_file.stat.exists
You can’t perform that action at this time.
0 commit comments