NETWAYS / NETWAYS/ansible-collection-elasticstack
[Bug]: elasticsearch_jvm_custom_parameters is never applied
Nobody has claimed this yet.
- Dominant language
- Jinja
- Stars
- 14
- Forks
- 11
- Avg merge
- 1d 47m
- Merged PRs (30d)
- 6
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:
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.
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.
Assessment
- Tech stack
- ansible, elasticsearch
- Domain
- devops, search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100