Ansible/playbook/linux/elastic/config-kibana.yml
James Tombleson 3f49a5fe88 -sigh-
After trying to go down the path of editing the configs with inline I am going to change over to a template file and see if I can get that to work better for me.  At least Elastic will now let me hit the REST.
2019-04-23 12:21:00 -07:00

59 lines
1.4 KiB
YAML

- 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