always update package components state file to ensure index templates are created with any available integration components

This commit is contained in:
reyesj2
2025-02-17 12:29:27 -06:00
parent 12f0195f29
commit 3530bff320

View File

@@ -91,16 +91,13 @@ 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
else
echo "Elastic integrations don't appear to need installation/updating..."
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
echo "Elastic integrations don't appear to need installation/updating..."
exit 0
fi
else
# This is the installation of add-on integrations and upgrade of existing integrations. Exiting without error, next highstate will attempt to re-run.
echo "Elastic Fleet does not appear to be responding... Exiting... "