61 lines
1.5 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: Logstash Setup
template: >
src={{ item }}
dest=/etc/logstash/conf.d/{{ item }}
owner=root
group=root
register: results
with_items:
- 01-input.conf
- 02-rsyslog.conf
- 03-generic.conf
- 04-routes.conf
- 05-cinder.conf
- 06-nova.conf
- 07-sqlalchemy.conf
- 99-output.conf
- name: Logstash Extra Patterns
template: >
src={{ item }}
dest=/opt/logstash/patterns/{{ item }}
owner=logstash
group=logstash
register: results
with_items:
- extras
- name: Logstash Tuning
template: >
src={{ item }}
dest=/etc/default/{{ item }}
owner=root
group=root
register: results
with_items:
- logstash
- name: restart logstash
service: name=logstash state=restarted pattern=logstash
- name: prevent logstash-web from starting on boot
copy: dest=/etc/init/logstash-web.override content="manual\n" owner=root group=root mode=644
- name: stop logstash-web
service: name=logstash-web state=stopped