This commit is contained in:
reyesj2
2025-09-18 15:42:25 -05:00
parent 81b7e2b420
commit 336ca0dbbd
2 changed files with 2 additions and 2 deletions

View File

@@ -142,7 +142,7 @@ elastic_fleet_installed_packages() {
} }
elastic_fleet_agent_policy_ids() { elastic_fleet_agent_policy_ids() {
if output=$(fleet_api "agent_policies"); if output=$(fleet_api "agent_policies"); then
echo "$output" | jq -r .items[].id echo "$output" | jq -r .items[].id
else else
echo "Error: Failed to retrieve agent policies." echo "Error: Failed to retrieve agent policies."

View File

@@ -50,7 +50,7 @@ if [[ "$RETURN_CODE" != "0" ]]; then
fi fi
printf "\n### Create ES Token ###\n" printf "\n### Create ES Token ###\n"
if ESTOKEN_RAW=$(fleet_api "service_tokens" -XPOST-H 'kbn-xsrf: true' -H 'Content-Type: application/json'); then if ESTOKEN_RAW=$(fleet_api "service_tokens" -XPOST -H 'kbn-xsrf: true' -H 'Content-Type: application/json'); then
ESTOKEN=$(echo "$ESTOKEN_RAW" | jq -r .value) ESTOKEN=$(echo "$ESTOKEN_RAW" | jq -r .value)
else else
echo -e "\nFailed to create ES token..." echo -e "\nFailed to create ES token..."