Repository navigation
Restart Kibana before waiting for it and leave a disabled Kibana alone - #565
Merged
Merged
Conversation
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configure Kibana, the package tasks and the certificate copies notifyRestart Kibana, but the handler ran at the end of the play. The wait tasks ran before it, against the old process, so after a change nothing waited for the restarted Kibana and the next play, for example the Beats setup loading its dashboards, could find it down.The role now runs the notified handlers right after
Start Kibanawithmeta: flush_handlers, like the elasticsearch role does inelasticsearch-security.yml, and the waits see the new process. After a fresh start the handler still skips the restart. The flush and the wait block carry the certificate tags, so a run with--tags renew_kibana_certwaits as well.With
kibana_enable: falsethe handler restarted Kibana anyway, and the wait block still waited for it, up to 300 seconds when Kibana is not running. Both checkkibana_enablenow.A run with
--tags renew_kibana_cert,renew_caorcertificatesfailed withInvalid password or PKCS12 datawhenelasticstack_cert_passis set. The task that copies it intokibana_tls_key_passphrasehad no tags, so the certificate was read with the defaultPleaseChangeMe. As CONTRIBUTING.md asks, the set_fact tasks of the role that only build variables and cannot fail are taggedalwaysnow. Two are not: the package name needselasticstack_versionseparatorfrom the OS vars, which a run with--tagsdoes not load, and the expiration days read a registered result.Renewing the certificate also failed on a macOS control node. The backup of the temporary certificate on the control node was made as root with the group
root, which macOS does not have. That block runs withbecome: falsenow, as the user who runs Ansible, without owner and group.Tested on a Vagrant setup with three Elasticsearch nodes, Kibana and Logstash on Ubuntu 22.04, run from macOS: a config change restarts Kibana before the waits and the Auditbeat setup right after it succeeds, with
kibana_enable: falseneither restart nor wait runs,--tags renew_kibana_certrenews the certificate, restarts and waits, and a following run changes nothing.Closes #563
Closes #484