DataDog / ansible-datadog

Ansible role for Datadog Agent
Apache License 2.0
297 stars 222 forks source link

Datadog Agent Installation Fails on `arm64` (M1) Mac Without Rosetta #531

Closed jtdressel closed 1 month ago

jtdressel commented 9 months ago

Environment:

Issue Description: The installation of the Datadog Agent fails on an Apple Silicon Mac without Rosetta installed. The failure appears to be associated with the task "Unpack and copy Datadog Agent files" in the datadog.dd collection (version 5.0.1), specifically in this section of the Ansible playbook.

Steps to Reproduce:

  1. Execute an Ansible playbook on an M1 Mac with macOS 14.1.1, which lacks Rosetta but has command line tools installed.
  2. The playbook employs the datadog.datadog role with become: yes.
  3. Observe failure in the task of unpacking and copying Datadog Agent files, likely due to the mentioned code section.

Actual Behavior: Installation fails with an error indicating the necessity of Rosetta 2.

Error Message:

TASK [datadog.datadog : Unpack and copy Datadog Agent files]
fatal: []: FAILED! => {
  "changed": true,
  "cmd": "/usr/sbin/installer -pkg \"`find \"/Volumes/datadog_agent\" -name \\*.pkg 2>/dev/null`\" -target /",
  ...
  "stderr": "installer: This package requires Rosetta 2 to be installed. Please install Rosetta 2 and try again. `sudo softwareupdate --install-rosetta` installer: Error - Agent can’t be installed on this computer."
  ...
}
Pythyu commented 6 months ago

Hey 👋 Thanks for the report and sorry for the late answer ! Sadly, It isn't an issue we can solve on via the ansible-role. Our current macOS agent requires rosetta to function since we're using the same package for intel and arm macOS.