DataDog / ansible-datadog

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

Installation of integration may require acl package #477

Open magnusbaeck opened 1 year ago

magnusbaeck commented 1 year ago

I tried to install the Logstash integration by adding

datadog_integration:
  datadog-logstash:
    action: install
    version: 1.1.0
    third_party: true

to the role import but got the following error during execution:

TASK [datadog_agent : Install pinned version of integrations (Unix)] ***********
fatal: [REDACTED]: FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: 'A+user:dd-agent:rx:allow'\nTry 'chmod --help' for more information.\n}). For information on working around this, see https://docs.ansible.com/ansible-core/2.11/user_guide/become.html#becoming-an-unprivileged-user"}

After some googling I found https://github.com/ansible/ansible/issues/74830 which pointed me to the need of installing the acl package. After doing that manually the installation worked fine. I'm not sure if this counts as an issue with Ansible or this role, but even if we don't install that package for the user perhaps it should at least receive an honorable mention in the readme?

This happened on Ubuntu 18.04, Ansible 2.11.12 using 4.18.0 of this role.

bkabrda commented 1 year ago

Hi :wave: thanks for the report, I can reproduce this error. I think what we want to do is just to make sure that the acl package is installed if we want to install integrations (we already have a precedent with installing other dependencies because we install apt-transport-https and gnupg). I'll need to take a look whether this issue can also pop up on other Linux distros to submit a PR that would fix this everywhere, but otherwise this should be pretty straightforward.

Because the workaround is available (installing acl), I can't promise right now where we'll fix this, but I'll add it to our backlog.