Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tasks/pkg-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
msg: "The Datadog ansible role does not currently support Agent 5 on macOS"
when: datadog_agent_major_version|int == 5

- name: Check if the macOS user for Agent service exists
command: id -u "{{ datadog_macos_user }}"
register: mac_user_check
changed_when: false
ignore_errors: true

- name: Fail if the macOS user for Agent service doesn't exist
fail:
msg: "The Datadog ansible role wasn't able to find the user : {{ datadog_macos_user }}"
when: mac_user_check.rc != 0

- include_tasks: pkg-macos/macos_agent_latest.yml
when: (not datadog_skip_install) and (datadog_agent_macos_version is not defined)

Expand Down