Skip to content

Conversation

@KSerrania
Copy link
Contributor

What does this PR do?

If datadog_agent_version is set, extracts the major version from it and sets datadog_agent_major_version with this value.
If datadog_agent_major_version is already set, checks that the two variables are compatible, otherwise raises an error.

Additional notes

Due to this, we need to cast datadog_agent_major_version to a string (as the extracted major version is a string) in all cases.

@KSerrania KSerrania force-pushed the kserrania/infer-major-version branch from 8bbc296 to 316a0dd Compare December 13, 2019 08:47
Co-Authored-By: Albert Vaca <albert.vaca@datadoghq.com>
@KSerrania KSerrania merged commit 1e76b78 into kserrania/agent7-support Dec 16, 2019
@KSerrania KSerrania deleted the kserrania/infer-major-version branch December 16, 2019 15:35
KSerrania added a commit that referenced this pull request Dec 18, 2019
* Agent 7 support

Adds Agent 7 install support.

The datadog_agent5 option is deprecated and replaced by datadog_agent_major_version, which can be set to 5, 6 or 7.
If set, the datadog_agent_version option must have the major version specified in datadog_agent_major_version.

For Agent 6 and 7, the datadog_apt_repo, datadog_yum_repo, datadog_zypper_repo options have been changed: if they're not set, the module will use the official Datadog repository
for the major version specified in datadog_agent_major_version. If they're set, the specified repository will be used, regardless of the datadog_agent_major_version set.

* Infer major version from datadog_agent_version (#239)

If datadog_agent_version is set, extracts the major version from it and sets datadog_agent_major_version with this value.
If datadog_agent_major_version is already set, checks that the two variables are compatible, otherwise raises an error.

Co-Authored-By: Albert Vaca <albert.vaca@datadoghq.com>

Co-Authored-By: maxime mouial <hush-hush@users.noreply.github.com>

Co-Authored-By: Olivier Vielpeau <olivielpeau@users.noreply.github.com>
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 this pull request may close these issues.

3 participants