From 3530bff320522e6c255b77bfd55e9301346bc9fa Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:29:27 -0600 Subject: [PATCH] always update package components state file to ensure index templates are created with any available integration components --- .../sbin/so-elastic-fleet-optional-integrations-load | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/salt/elasticfleet/tools/sbin/so-elastic-fleet-optional-integrations-load b/salt/elasticfleet/tools/sbin/so-elastic-fleet-optional-integrations-load index 6d87b958c..dface5a72 100644 --- a/salt/elasticfleet/tools/sbin/so-elastic-fleet-optional-integrations-load +++ b/salt/elasticfleet/tools/sbin/so-elastic-fleet-optional-integrations-load @@ -91,15 +91,12 @@ if [[ -f $STATE_FILE_SUCCESS ]]; then if [ "$PENDING_UPDATE" = true ]; then # Run bulk install of packages elastic_fleet_bulk_package_install $BULK_INSTALL_PACKAGE_LIST > $BULK_INSTALL_OUTPUT - - # Write out file for generating index/component/ilm templates - latest_installed_package_list=$(elastic_fleet_installed_packages) - echo $latest_installed_package_list | jq '[.items[] | {name: .name, es_index_patterns: .dataStreams}]' > $PACKAGE_COMPONENTS - else echo "Elastic integrations don't appear to need installation/updating..." - exit 0 fi + # Write out file for generating index/component/ilm templates + latest_installed_package_list=$(elastic_fleet_installed_packages) + echo $latest_installed_package_list | jq '[.items[] | {name: .name, es_index_patterns: .dataStreams}]' > $PACKAGE_COMPONENTS else # This is the installation of add-on integrations and upgrade of existing integrations. Exiting without error, next highstate will attempt to re-run.