From 8f832703fb1855cd000704e6588618e729da687d Mon Sep 17 00:00:00 2001 From: Danny Gilbert <87996558+dgilbert-foreflight@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:06:09 -0600 Subject: [PATCH] Update install_runner_unix.yml Resolves the following error due to how `ansible_distribution` resolves for macOS distributions ``` TASK [monolithprojects.github_actions_runner : STOP and disable Github Actions Runner service] **************************** fatal: [build-agent-26]: FAILED! => {"changed": true, "cmd": ["./svc.sh", "stop"], "delta": "0:00:00.004103", "end": "2024-11-04 15:02:53.034496", "msg": "non-zero return code", "rc": 1, "start": "2024-11-04 15:02:53.030393", "stderr": "", "stderr_lines": [], "stdout": "Must not run with sudo", "stdout_lines": ["Must not run with sudo"]} ``` --- tasks/install_runner_unix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/install_runner_unix.yml b/tasks/install_runner_unix.yml index b398de4..f28e633 100644 --- a/tasks/install_runner_unix.yml +++ b/tasks/install_runner_unix.yml @@ -165,7 +165,7 @@ args: chdir: "{{ runner_dir }}" changed_when: true - become: "{{ 'false' if ansible_distribution == 'MacOS' else 'true' }}" + become: "{{ 'false' if ansible_distribution == 'MacOSX' else 'true' }}" no_log: "{{ hide_sensitive_logs | bool }}" ignore_errors: "{{ ansible_check_mode }}" when: runner_state|lower == "stopped"