NETWAYS / NETWAYS/ansible-collection-elasticstack

[Bug]: Kibana restart handler ignores kibana_enable

Open Beginner friendly
#484 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Please try to fill out as much of the information below as you can. Thank you!
  • Yes, I've searched similar issues on GitHub and didn't find any.
Which version contains the bug?

No response

Description

The "Restart Kibana" handler in roles/kibana/handlers/main.yml only checks
not kibana_freshstart.changed. Unlike the logstash and beats restart handlers, it does
not also check kibana_enable.

As a result, if kibana_enable: false (Kibana should not run) but the role still changes
kibana.yml (kibana_manage_yaml is true by default), the config task notifies the
handler and it tries to restart the kibana service anyway — contrary to the user having
disabled it.

Fix

Guard the handler with kibana_enable as well, matching the logstash/beats handlers:

when:
  - kibana_enable | bool
  - not kibana_freshstart.changed | bool

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 in roles/kibana/handlers/main.yml and compare the Restart Kibana handler with the corresponding Logstash and Beats handlers. Confirm the behavior when kibana_enable is false and kibana.yml changes; done means the handler no longer attempts a restart while Kibana is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible
Domain
devops
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.