e115b59965
This PR removes the use of the ">" sign commands where this was an issue. Resolves: #192
90 lines
2.3 KiB
YAML
90 lines
2.3 KiB
YAML
---
|
|
# Copyright 2014, Rackspace US, Inc.
|
|
#
|
|
# Licensed 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: ElasticSearch Setup
|
|
template:
|
|
src: "{{ item }}"
|
|
dest: "/etc/elasticsearch/{{ item }}"
|
|
owner: "root"
|
|
group: "root"
|
|
register: results
|
|
with_items:
|
|
- elasticsearch.yml
|
|
- logging.yml
|
|
|
|
- name: ElasticSearch Tuning
|
|
template:
|
|
src: "{{ item }}"
|
|
dest: "/etc/default/{{ item }}"
|
|
owner: "root"
|
|
group: "root"
|
|
register: results
|
|
with_items:
|
|
- elasticsearch
|
|
|
|
- name: Install ElasticHQ Plugin
|
|
command: ./plugin -install {{ item }}
|
|
args:
|
|
chdir: /usr/share/elasticsearch/bin
|
|
creates: /usr/share/elasticsearch/plugins/HQ
|
|
with_items:
|
|
- royrusso/elasticsearch-HQ
|
|
|
|
- name: Install Kopf Plugin
|
|
command: ./plugin -install {{ item }}
|
|
args:
|
|
chdir: /usr/share/elasticsearch/bin
|
|
creates: /usr/share/elasticsearch/plugins/kopf
|
|
with_items:
|
|
- lmenezes/elasticsearch-kopf
|
|
|
|
- name: Install Head Plugin
|
|
command: ./plugin -install {{ item }}
|
|
args:
|
|
chdir: /usr/share/elasticsearch/bin
|
|
creates: /usr/share/elasticsearch/plugins/head
|
|
with_items:
|
|
- mobz/elasticsearch-head
|
|
|
|
- name: Install BigDesk Plugin
|
|
command: ./plugin -install {{ item }}
|
|
args:
|
|
chdir: /usr/share/elasticsearch/bin
|
|
creates: /usr/share/elasticsearch/plugins/bigdesk
|
|
with_items:
|
|
- lukas-vlcek/bigdesk/2.4.0
|
|
|
|
- name: restart elasticsearch
|
|
service: name=elasticsearch state=restarted pattern=elasticsearch enabled=yes
|
|
when: results|changed
|
|
|
|
- name: Wait for elasticsearch port
|
|
wait_for:
|
|
host: "{{ ansible_ssh_host }}"
|
|
port: "9200"
|
|
|
|
- name: Deploy mapping script
|
|
template:
|
|
src: "{{ item }}"
|
|
dest: "/opt/{{ item }}"
|
|
owner: "root"
|
|
group: "root"
|
|
mode: "0755"
|
|
with_items:
|
|
- mapping.sh
|
|
|
|
- name: Add logging template
|
|
shell: /opt/mapping.sh
|