---
# Copyright 2016, 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: Deploy Filebeat Configuration Files
  template:
    src: "{{ item.src }}"
    dest: "{{ item.dest }}"
  with_items: "{{ filebeat_configuration_files }}"
  notify: "Restart Filebeat"
  tags:
    - filebeat-configuration
    - filebeat-post-install

---
# Copyright 2016, 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: Deploy Filebeat Configuration Files
  template:
    src: "{{ item.src }}"
    dest: "{{ item.dest }}"
  with_items: "{{ filebeat_configuration_files }}"
  notify: "Restart Filebeat"
  tags:
    - filebeat-configuration
    - filebeat-post-install

- name: Ensuring filebeat is started on boot
  service:
    name: filebeat
    enabled: yes
    state: started
  tags:
    - filebeat-post-install
Fix filebeat not started on containers
Fix filebeat not started on containers

filebeat playbook ensure the service is restarted if running, but
doesn't ensure the service is started on boot.
This makes sure the service is listed in the appropriate rc folder.

Connects #1274

Signed-off-by: Jean-Philippe Evrard <caf706c7ed4f455414f97895225dd6a9c0cfec8e@rackspace.co.uk>
