ccyunchina-deploy/roles/gpaas/efk/kibana/tasks/main.yml

26 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- name: 创建kibana.yaml文件
template: src=kibana.yaml dest={{ base_dir }}/manifests/kibana.yaml
ignore_errors: "{{ ansible_check_mode }}"
- name: 部署kibana
shell: "{{bin_dir}}/kubectl apply -f {{ base_dir }}/manifests/kibana.yaml -n kube-system"
ignore_errors: "{{ ansible_check_mode }}"
#- name: 导入kibana dashboards.json文件如果超时请手动去执行
# shell: "curl -XPOST 'http://{{MASTER_IP}}:5601/api/kibana/dashboards/import?force=true' -H 'Content-Type: application/json' -H 'kbn-xsrf: reporting' -d @{{ base_dir }}/roles/elk/kibana/files/dashboards.json -m 10 -o /dev/null -s -w %{http_code}"
# register: kibana_result
# until: '"200" == kibana_result.stdout'
# retries: 60
# delay: 15
# ignore_errors: true
# when: not ansible_check_mode
#- name: 导入kibana filebeat.json文件如果超时请手动去执行
# shell: "curl -XPOST 'http://{{MASTER_IP}}:5601/api/kibana/dashboards/import?force=true' -H 'Content-Type: application/json' -H 'kbn-xsrf: reporting' -d @{{ base_dir }}/roles/elk/kibana/files/filebeat.json -m 10 -o /dev/null -s -w %{http_code}"
# register: kibana_result1
# until: '"200" == kibana_result1.stdout'
# retries: 60
# delay: 15
# ignore_errors: true
# when: not ansible_check_mode