Ansible/playbook/linux/elastic/config-kibana.yml

50 lines
1.1 KiB
YAML
Raw Normal View History

- name: Config - Server.Port 5601
become: true
lineinfile:
path: /etc/kibana/kibana.yml
regex: '^server.port'
insertafter: '#server.port: 5601'
line: 'server.port: 5601'
backup: yes
- name: Config - Server.host
become: true
lineinfile:
path: /etc/kibana/kibana.yml
regex: '^server.host'
insertafter: '#server.host'
line: 'server.host: {{ ansible_eno1.ipv4.address }}'
- name: Config - elasticsearch.hosts
become: true
lineinfile:
path: /etc/kibana/kibana.yml
regex: '^elasticsearch.hosts'
insertafter: '#elasticsearch.hosts:'
line: 'elasticsearch.hosts: ["http://localhost:9200"]'
- name: Allow port 5601
become: true
ufw:
rule: allow
port: 5601
- name: systemd - daemon reload
become: true
systemd:
daemon_reload: yes
- name: systemd - enable Kibana on startup
become: true
systemd:
name: kibana
enabled: yes
- name: systemd - restart Kibana
become: true
systemd:
name: kibana
state: restarted