Skip to content

Commit

Permalink
Restart Kibana only when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
widhalmt committed Sep 29, 2023
1 parent 2140b71 commit e75994b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/kibana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ kibana_cert_will_expire_soon: false
kibana_sniff_on_start: false
kibana_sniff_on_connection_fault: false

kibana_freshstart:
changed: false

# "global" variables for all roles
elasticstack_release: 8
elasticstack_full_stack: true
Expand Down
2 changes: 2 additions & 0 deletions roles/kibana/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
ansible.builtin.service:
name: kibana
state: restarted
when:
- not kibana_freshstart.changed | bool
1 change: 1 addition & 0 deletions roles/kibana/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
state: started
enabled: yes
when: kibana_enable | bool
register: kibana_freshstart

# the following is useful when running tests or extra tasks that need to
# have Kibana running. Escape it on Rocky8, because it gets time out with Elastic 8
Expand Down

0 comments on commit e75994b

Please sign in to comment.