From ba68e3c9bde14aaeeea66d75f944eb753b732fba Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Tue, 20 Jan 2026 15:30:19 -0600 Subject: [PATCH] more better --- salt/elasticfleet/install_agent_grid.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/elasticfleet/install_agent_grid.sls b/salt/elasticfleet/install_agent_grid.sls index f891c8b86..482af2e1e 100644 --- a/salt/elasticfleet/install_agent_grid.sls +++ b/salt/elasticfleet/install_agent_grid.sls @@ -8,9 +8,9 @@ {% endif %} {% set AGENT_STATUS = salt['service.available']('elastic-agent') %} -{% set AGENT_RC = salt['cmd.retcode']('elastic-agent status', ignore_retcode=True) %} +{% set AGENT_EXISTS = salt['file.file_exists']('/opt/Elastic/Agent/elastic-agent') %} -{% if not AGENT_STATUS or AGENT_RC == 127 %} +{% if not AGENT_STATUS or not AGENT_EXISTS %} pull_agent_installer: file.managed: