Skip to content

[Feature]: Make elasticsearch_network_host more flexible #317

@widhalmt

Description

@widhalmt

Describe the feature request

In #315 we stumbled over a potential suite of problems:

  • elasticsearch_network_host now is a string that may or may not contain an array of network addresses and macros. (e.g. 192.168.15.5 or `"local", "site", "elastic01".
  • In our current code, the string is used "as is" and contain what ever Elasticsearch can take in
  • In Use elasticsearch_network_host for connection tests if defined #315 the contents of the variable is to be used to connect to Elasticsearch via curl or uri module. This means it could only hold a network address
  • If we make a list instead of a string, we could easily choose one of the addresses for connection. But we would break compatibility to existing setups. (Bad but doable, since we're not on 1.0.0, yet)
  • If we make it a list, we need to find a way to choose one that's actually reachable via network and not a macro

The only solutions I can think of for now is to introduce another variable that holds a list. Then parse the list, find a network address and use this as a default for elasticstack_network_host. And replace the appearance of the variable in templates with the new one. Or leave anything as it is and introduce a new variable like elasticsearch_network_host_connect when trying to reach the host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions