Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datadog APM does not work with Ansible 2.9 #518

Open
willwen opened this issue Oct 12, 2023 · 2 comments
Open

Datadog APM does not work with Ansible 2.9 #518

willwen opened this issue Oct 12, 2023 · 2 comments

Comments

@willwen
Copy link

willwen commented Oct 12, 2023

The Readme says ansible 2.6+ works with this datadog role.
https://github.com/DataDog/ansible-datadog/blob/main/README.md?plain=1#L20

If you use 2.9, and try to do apm instrumentation, the argument list_merge here

agent_datadog_config: "{{ agent_datadog_config | combine(agent_dd_apm_host_inject_config, list_merge='keep') }}"
was only introduced in ansible 2.10
https://github.com/ansible-community/ansible-build-data/blob/main/2.10/CHANGELOG-v2.10.rst#L4186

The error you will get is:

TASK [datadog.dd.agent : Update datadog_config including config values needed for APM host injection] ****************************
task path: /home/test_user/.ansible/collections/ansible_collections/datadog/dd/roles/agent/tasks/apm-inject-check.yml:71
fatal: [FOOBAR]: FAILED! => {
    "msg": "'recursive' is the only valid keyword argument"
}

Solution for me was to upgrade ansible

@bkabrda
Copy link
Contributor

bkabrda commented Feb 22, 2024

Hi 👋 thanks for the issue report.
You're absolutely right that this won't work on Ansible < 2.10. Unfortunately maintaining compatibility with these EOLed Ansible versions is becoming harder and harder and causes problems such as this one.
I'm glad that you could upgrade and that fixes it for you. I'll leave this issue open for now and I'd encourage anyone with the same issue (who can't upgrade) to let us know here - that will help us gauge the urgency of fixing this.

@aairey
Copy link

aairey commented Apr 16, 2024

This role needs a major (breaking) update to drop support for the unsupported ansible versions and support the newer ones fully.
Like embracing FQCN.
I am getting failures on Ansible 2.16.5, which is a supported version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants