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 106106 src : " {{ runner_dir }}/.service"
107107 register : runner_service
108108
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)
110110 ansible.builtin.command : " ./svc.sh start"
111111 args :
112112 chdir : " {{ runner_dir }}"
113- become : " {{ 'false' if ansible_system == 'Darwin' else 'true' }}"
114113 no_log : " {{ hide_sensitive_logs | bool }}"
115114 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
117125
118126- name : STOP and disable Github Actions Runner service
119127 ansible.builtin.shell : " ./svc.sh stop"
You can’t perform that action at this time.
0 commit comments