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_agent_version is not fully pinned on Linux with apt #455

Open
robin-wayve opened this issue Sep 15, 2022 · 1 comment
Open

datadog_agent_version is not fully pinned on Linux with apt #455

robin-wayve opened this issue Sep 15, 2022 · 1 comment

Comments

@robin-wayve
Copy link

robin-wayve commented Sep 15, 2022

We set a pinned version with datadog_agent_version. Since the role does not use ansible.builtin.dpkg_selections to put a hold on datadog-agent, hosts can upgrade the datadog-agent package when new versions become available (via apt upgrade or similar).

If a host does this, the role can't be applied due to trying to downgrade the package (which is a thing you can enable, but only on ansible-core 2.12+, I think).

Workaround I have used:

  • gather package facts
  • run ansible.builtin.dpkg_selections with selection: deinstall (un-pin) if the version is newer than the installed version
  • include the datadog role / install the package
  • run ansible.builtin.dpkg_selections with selection: hold (pin) to prevent upgrades

I can provide more details if there's interest in handling this in the role.

@bkabrda
Copy link
Contributor

bkabrda commented May 16, 2023

Hi 👋 thanks for opening the issue. We've actually added similar functionality for Red Hat based distros already in #443, so I think adding it for Debian based distros makes a perfect sense. I'll add this to our backlog to implement. Thanks!

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

2 participants