Make journalbeat install detect if it should install
When running on a system where there is no journal or no systemd skip the journalbeat playbooks. Change-Id: I92c804e8eb2ab2f9b86eca09fc51d19be66c7190 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
cd299ee1ce
commit
57754a4346
@ -48,6 +48,18 @@
|
||||
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
|
||||
pre_tasks:
|
||||
- name: Check for journal directory
|
||||
stat:
|
||||
path: /var/log/journal
|
||||
register: journal_dir
|
||||
|
||||
- name: exit playbook
|
||||
meta: end_play
|
||||
when:
|
||||
- not (journal_dir.stat.exists | bool) or
|
||||
ansible_service_mgr != 'systemd'
|
||||
|
||||
roles:
|
||||
- role: elastic_journalbeat
|
||||
- role: elastic_rollup
|
||||
|
Loading…
x
Reference in New Issue
Block a user