blob: 09739be53a3c6a0a64937471e153471c8f379d16 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
- name : Wait for Elasticsearch Host to Start
wait_for:
host: "{{ groups.search[0] }}"
port: "{{ elasticsearch_web_port }}"
delay: 10
timeout: 300
- name: Wait for Green Index Status
uri:
url: "http://{{ groups.search[0] }}:{{ elasticsearch_web_port }}/_cat/health"
method: GET
status_code: 200
return_content: yes
register: result
until: result.content.find("green") != -1
retries: 10
delay: 60
run_once: yes
- name: Add Elasticsearch templates for topologies
uri:
url: "http://{{ groups.search[0] }}:{{ elasticsearch_web_port }}/_template/template_yaf"
method: POST
body: "{{ lookup('file','yaf_index.template') }}"
status_code: 200
body_format: json
run_once: yes