[Bug]: elasticsearch_jvm_custom_parameters is never applied
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with roles/elasticsearch/tasks/main.yml, defaults/main.yml, and meta/argument_specs.yml, then compare the custom-parameter handling with other optional list variables. Done means the list is accepted by the argument spec, the task is eligible when supplied, and the default no longer masks its optional nature.
Written by the indexing model from the issue text.
Description
The "Set jvm custom options" task in roles/elasticsearch/tasks/main.yml is gated by
when: elasticsearch_jvm_custom_parameters | bool, but the variable is meant to be a
list of JVM option lines (the template does {% for item in elasticsearch_jvm_custom_parameters %}).
A list is not a recognized boolean, so | bool returns False for any list — verified:
['-Xss1m'] | bool → False. The task is therefore never executed and custom JVM
options are silently ignored. No value both passes | bool and is iterable, so the
variable is effectively dead.
Fix:
- Remove
elasticsearch_jvm_custom_parametersfromdefaults/main.yml— an optional list
needs no default. - In
meta/argument_specs.yml:type: list,elements: str, no default. - Change the task condition to
when: elasticsearch_jvm_custom_parameters is defined
(consistent with the other optional list variables).
To Reproduce
No response
Your Environment
- Version (commit) used:
- Ansible version:
- Python version:
- Operating System and version:
- Dominant language
- Jinja
- Stars
- 14
- Forks
- 11
- Avg merge
- 1d 47m
- Merged PRs (30d)
- 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NETWAYS/ansible-collection-elasticstack
-
component:beats
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NETWAYS/ansible-collection-elasticstack#519 · 1 comment ·
-
component:filebeat
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
breaking-change component:elasticsearch quality
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug component:kibana
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
component:metricbeat
Difficulty 1/5 Under an hour Newbie friendliness 94/100
All issues in NETWAYS/ansible-collection-elasticstack
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
repo:raw-data
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
hotosm/raw-data-api#316 · 1 comment ·
-
agentic-workflows cascade-suspected
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
willow
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openedx/openedx-authz#460 ·