Skip to content

fix: unify version selection across roles (install latest by default)#489

Open
Saeid-Abadi wants to merge 5 commits into
mainfrom
feat/313-version-selection
Open

fix: unify version selection across roles (install latest by default)#489
Saeid-Abadi wants to merge 5 commits into
mainfrom
feat/313-version-selection

Conversation

@Saeid-Abadi

Copy link
Copy Markdown
Contributor

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:

  • elasticstack_version unset/empty/'latest' -> name without version, state: latest (install/keep newest)
  • elasticstack_version set to a version -> versioned name,
    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

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
@Saeid-Abadi Saeid-Abadi force-pushed the feat/313-version-selection branch from 4c63b0d to c8ea620 Compare July 3, 2026 09:28
Saeid Hassanabadi 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
@Saeid-Abadi Saeid-Abadi force-pushed the feat/313-version-selection branch from 2c28810 to fe00d42 Compare July 3, 2026 10:36
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.

Rework version selection, especially in beats

1 participant