fix: unify version selection across roles (install latest by default)#489
Open
Saeid-Abadi wants to merge 5 commits into
Open
fix: unify version selection across roles (install latest by default)#489Saeid-Abadi wants to merge 5 commits into
Saeid-Abadi wants to merge 5 commits into
Conversation
Compute package name and package state from elasticstack_version instead of duplicating install tasks. unset/empty/'latest' -> state: latest; concrete version -> state: present. Stored in internal fact _elasticstack_package_state. Removes duplicate beats tasks and the KICS 'latest' workaround, documents the scheme in the getting started guide. Refs #313
4c63b0d to
c8ea620
Compare
added 2 commits
July 3, 2026 12:01
Remove the duplicate "latest" install tasks from the beats role and select the version solely via the package name: unset/empty/'latest' installs the unversioned package (newest on first install), a concrete elasticstack_version pins that exact version. All roles install with state: present, so re-runs never trigger an unplanned upgrade. Documents the scheme in the getting started guide. Refs #313
Remove the duplicate "latest" install tasks from the beats role. The package version is now selected solely via the package name: a defined elasticstack_version installs that exact version, an unset value installs the unversioned package (newest available). All roles install with state: present. Documents the behaviour in the README. Refs #313
2c28810 to
fe00d42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Beats previously carried duplicate install tasks: one set for a pinned version and a second set with 'state: latest', gated on elasticstack_version == 'latest'. This doubled the task count in the beats role and the 'latest' option was not available in the other roles.
Collapse this into a single install task per package by computing both the package name and the package state:
state: present (pin exact version)
The behaviour is now identical across beats, kibana, elasticsearch and logstash: latest is installed by default, a concrete version is used when elasticstack_version is defined. 'latest' is still accepted as an explicit alias for backwards compatibility. Removes the duplicate beats tasks and the KICS 'latest' lint workaround.
Refs #313
Closes #313