openstack-ansible-ops/elk_metrics_6x/setupJournalbeat.yml
Jonathan Rosser dbc1ed3af3 Add an 'always' tag to cluster layout task include
The templates which generate the configuration for the various
components require access to the facts defining the cluster layout.

Running the setup*.yml playbooks with --tags config would not include
common_task_data_node_hosts.yml and templating would fail due to
undefined vars.

This change applys an 'always' tag to all uses of the include.

Change-Id: I6c55a60aef54f9bb26eb9a2af08315265daa82d9
2018-06-20 15:03:20 +00:00

48 lines
1.4 KiB
YAML

---
# Copyright 2018, 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: Load Journalbeat Dashboards
hosts: hosts[0]
gather_facts: false
vars_files:
- vars/variables.yml
pre_tasks:
# NOTE(cloudnull): This task is broken at this point due to missing
# configuration. Once the following issue
# [ https://github.com/mheese/journalbeat/issues/136 ] is
# resolved, this should be removed.
- name: exit playbook
meta: end_play
- include_tasks: common_task_data_node_hosts.yml
tags:
- always
tasks:
- name: Load templates
shell: >-
/usr/local/bin/journalbeat -setup
-E 'output.logstash.enabled=false'
-E 'output.elasticsearch.hosts={{ coordination_nodes | to_json }}'
-e -v
register: templates
until: templates is success
retries: 3
delay: 2
tags:
- beat-setup