NETWAYS / NETWAYS/ansible-collection-elasticstack

[Feature]: Make `elasticsearch_network_host` more flexible

Open
#317 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component:elasticsearch feature
Dominant language
Jinja
Stars
14
Forks
11
Avg merge
1d 47m
Merged PRs (30d)
6

Description

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 #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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the compatibility concerns and alternatives described in issue #317, then read issue #315 for the connection requirements. Trace every use of elasticsearch_network_host, including its use with curl or the uri module and in templates. Done means a decided, documented approach that preserves or intentionally replaces existing behavior and selects a usable connection address.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, elasticsearch
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.