From dec795501728acb8aa69525a7be278da38e03ec0 Mon Sep 17 00:00:00 2001 From: cloudnull Date: Mon, 11 Feb 2019 00:50:38 -0600 Subject: [PATCH] Change the overlay service start vars The beat service starts were overly complex this simplifies them. Change-Id: I3d059d06c5e7839b6ce2e0d39de3e88299a2e6bb Signed-off-by: cloudnull --- .../osa-integration-inventory.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/overlay-inventories/osa-integration-inventory.yml b/overlay-inventories/osa-integration-inventory.yml index 987a7e96..6cae32a3 100644 --- a/overlay-inventories/osa-integration-inventory.yml +++ b/overlay-inventories/osa-integration-inventory.yml @@ -130,18 +130,13 @@ all_systems: beats_all: vars: - beat_service_states: - true: - state: restarted - false: - state: stopped elastic_retention_refresh: true - auditbeat_service_state: "{{ auditbeat_service_state | default(beat_service_states[(inventory_hostname in (groups['hosts'] | default([])) | string | lower)]['state']) }}" - filebeat_service_state: "{{ filebeat_service_state | default(beat_service_states[(inventory_hostname in (groups['hosts'] | default([])) | string | lower)]['state']) }}" - heartbeat_service_state: "{{ heartbeat_service_state | default(beat_service_states[(inventory_hostname in (groups['kibana_all'] | default([])) | string | lower)]['state']) }}" - journalbeat_service_state: "{{ journalbeat_service_state | default(beat_service_states[(inventory_hostname in (groups['hosts'] | default([])) | string | lower)]['state']) }}" - metricbeat_service_state: "{{ metricbeat_service_state | default(beat_service_states[(inventory_hostname in (groups['hosts'] | default([])) | string | lower)]['state']) }}" - packetbeat_service_state: "{{ packetbeat_service_state | default(beat_service_states[(inventory_hostname in (groups['network_hosts'] | default([])) | string | lower)]['state']) }}" + auditbeat_service_state: "{{ (inventory_hostname in (groups['hosts'] | default([]))) | ternary('restarted', 'stopped') }}" + filebeat_service_state: "{{ (inventory_hostname in (groups['hosts'] | default([]))) | ternary('restarted', 'stopped') }}" + heartbeat_service_state: "{{ (inventory_hostname in (groups['kibana_all'] | default([]))) | ternary('restarted', 'stopped') }}" + journalbeat_service_state: "{{ (inventory_hostname in (groups['hosts'] | default([]))) | ternary('restarted', 'stopped') }}" + metricbeat_service_state: "{{ (inventory_hostname in (groups['hosts'] | default([]))) | ternary('restarted', 'stopped') }}" + packetbeat_service_state: "{{ (inventory_hostname in (groups['network_hosts'] | default([]))) | ternary('restarted', 'stopped') }}" children: auditbeat: children: