Skip to content

Add idempotent cluster settings management#88

Merged
Oddly merged 1 commit intomainfrom
feature/cluster-settings
Mar 9, 2026
Merged

Add idempotent cluster settings management#88
Oddly merged 1 commit intomainfrom
feature/cluster-settings

Conversation

@Oddly
Copy link
Copy Markdown
Owner

@Oddly Oddly commented Mar 9, 2026

Adds elasticsearch_cluster_settings, a dictionary variable that applies persistent cluster settings via the PUT _cluster/settings API after the cluster is healthy. The task reads current settings first and only applies when values differ, so subsequent runs are idempotent and report no changes.

This replaces the need for one-off variables for individual cluster settings. Any setting supported by the cluster settings API can be used — LogsDB, watermarks, recovery throttling, allocation awareness, etc.

elasticsearch_cluster_settings:
  cluster.logsdb.enabled: true
  indices.recovery.max_bytes_per_sec: "100mb"

The elasticsearch_default scenario tests this with action.destructive_requires_name and verifies it via the cluster settings API in the verify playbook.

Closes #21

…settings

Adds a new elasticsearch_cluster_settings dictionary variable that applies
persistent cluster settings via the PUT _cluster/settings API after the
cluster is healthy. Reads current settings first and only sends the PUT
when values differ. Runs once per play on the CA host.

This provides a general mechanism for any cluster-level setting, replacing
the need for one-off variables for individual settings. LogsDB, watermarks,
recovery throttling, and any other cluster setting can now be expressed as
a dict entry.

Closes #21
@Oddly Oddly merged commit 1d73c8b into main Mar 9, 2026
30 checks passed
@Oddly Oddly deleted the feature/cluster-settings branch March 9, 2026 12:12
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.

Add idempotent cluster settings management

1 participant