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: