Skip to content

[Bug]: elasticsearch_jvm_custom_parameters is never applied #494

Description

@afeefghannam89

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'] | boolFalse. 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_parameters from defaults/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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageNeeds to be triaged

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions