- 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 - server.name become: true lineinfile: path: /etc/kibana/kibana.yml regexp: 'server.name:' insertafter: '#server.name: "your-hostname"' line: 'server.name: {{ ansible_hostname }}' - name: Config - elasticsearch.hosts become: true lineinfile: path: /etc/kibana/kibana.yml regex: '^elasticsearch.hosts' insertafter: '#elasticsearch.hosts:' #line: 'elasticsearch.hosts: ["http://{{ ansible_eno1.ipv4.address }}:9200"]' line: 'elasticsearch.hosts: ["https://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