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_skip_install=true as host_var is ignored #430

Open
rockaut opened this issue Apr 11, 2022 · 3 comments
Open

datadog_skip_install=true as host_var is ignored #430

rockaut opened this issue Apr 11, 2022 · 3 comments

Comments

@rockaut
Copy link
Contributor

rockaut commented Apr 11, 2022

Summary

Currently it's not possible to override the datadog_skip_install variable directly from host_vars (for example from inventory). It will be overridden by set-parse-version.yml.

The only way currently is to override it from cli with extra-vars or with include_role vars.

Edit: PR incoming. The solution is easy.

rockaut added a commit to rockaut/ansible-datadog that referenced this issue Apr 11, 2022
@rockaut
Copy link
Contributor Author

rockaut commented Aug 6, 2024

Heja there all,

yeah I now stumbled upon this again - somehow that got overlooked totally by me. But now I would need that again too.
I will see if I can redo this from scratch ... again.

We have the problem that on some special hosts packages are locked down without the "normal" package manager because of security reasons. There it is needed that the "installation/upgrade" steps are skipped while all other things keep maintained.

Since opening of the issue a lot has been done - especially with the installer comming up too. But I still see the need for this IMO.

@rockaut
Copy link
Contributor Author

rockaut commented Aug 6, 2024

I looked into this a bit - maybe @bkabrda can comment on this?

Mainly agent_datadog_skip_install is set to false in some early stages by set_fact tasks. Later on it is set_fact again on some specific "rules" because of same version on each OS system.
IMO the "easiest", most logic, and also most "ansible" way would be to NOT set_fact it initially but "move" the variable to defaults/main.yaml so that it's user overrideable. And then in the set_fact usages check if the variable is already set and skip overriding it.

OR

In default/main.yaml make a new variable datadog_skip_install: false and use that in the set_fact occurences?

For maintainability I would say A is better than B?

@rockaut
Copy link
Contributor Author

rockaut commented Oct 2, 2024

I don't like to bump things really. But now as you guys are working on Remote Update for the Client this would be a great feature to have. What I mean is to be able to install the agent initially with the role, then skip the agent upgrade part and save a lot of task executions (saving a lot of time) because the agent version is managed remotely, but still configuring the checks/settings.

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

Successfully merging a pull request may close this issue.

1 participant