File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 106
106
src : " {{ runner_dir }}/.service"
107
107
register : runner_service
108
108
109
- - name : START and enable Github Actions Runner service # DOTO: Idempotence works only for Systemd. Need to fix for launchd.
109
+ - name : START and enable Github Actions Runner service (Linux)
110
110
ansible.builtin.command : " ./svc.sh start"
111
111
args :
112
112
chdir : " {{ runner_dir }}"
113
- become : " {{ 'false' if ansible_system == 'Darwin' else 'true' }}"
114
113
no_log : " {{ hide_sensitive_logs | bool }}"
115
114
ignore_errors : " {{ ansible_check_mode }}"
116
- when : runner_state|lower == "started" and ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'
115
+ when : ansible_system != 'Darwin' and runner_state|lower == "started" and ansible_facts.services[(runner_service.content | b64decode) | trim ]['state'] != 'running'
116
+
117
+ - name : START and enable Github Actions Runner service (macOS) # TODO: Idempotence
118
+ ansible.builtin.command : " ./svc.sh start"
119
+ args :
120
+ chdir : " {{ runner_dir }}"
121
+ become : false
122
+ no_log : " {{ hide_sensitive_logs | bool }}"
123
+ ignore_errors : " {{ ansible_check_mode }}"
124
+ when : ansible_system == 'Darwin' and runner_state|lower
117
125
118
126
- name : STOP and disable Github Actions Runner service
119
127
ansible.builtin.shell : " ./svc.sh stop"
You can’t perform that action at this time.
0 commit comments