Fix LaunchDaemon check to use become: true

LaunchDaemons run in the system domain and require sudo to query.
Without become: true, the check always fails and tries to reload.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Erich Blume 2026-01-22 17:34:23 -08:00
commit 16bfe06b7b

View file

@ -116,6 +116,7 @@
- name: Check if macos-power-metrics LaunchDaemon is loaded
ansible.builtin.command: launchctl list mcquack.eblume.macos-power-metrics
become: true
register: alloy_power_metrics_launchctl_check
changed_when: false
failed_when: false