We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94ed3ec commit 0139658Copy full SHA for 0139658
tasks/pkg-macos.yml
@@ -6,6 +6,17 @@
6
msg: "The Datadog ansible role does not currently support Agent 5 on macOS"
7
when: datadog_agent_major_version|int == 5
8
9
+- name: Check if the macOS user for Agent service exists
10
+ command: id -u "{{ datadog_macos_user }}"
11
+ register: mac_user_check
12
+ changed_when: false
13
+ ignore_errors: true
14
+
15
+- name: Fail if the macOS user for Agent service doesn't exist
16
+ fail:
17
+ msg: "The Datadog ansible role wasn't able to find the user : {{ datadog_macos_user }}"
18
+ when: mac_user_check.rc != 0
19
20
- include_tasks: pkg-macos/macos_agent_latest.yml
21
when: (not datadog_skip_install) and (datadog_agent_macos_version is not defined)
22
0 commit comments