diff --git a/dev-tools/packaging/templates/docker/docker-entrypoint.elastic-agent.tmpl b/dev-tools/packaging/templates/docker/docker-entrypoint.elastic-agent.tmpl index 614ff3ed32e3..b2b9ab4212af 100644 --- a/dev-tools/packaging/templates/docker/docker-entrypoint.elastic-agent.tmpl +++ b/dev-tools/packaging/templates/docker/docker-entrypoint.elastic-agent.tmpl @@ -41,7 +41,7 @@ function enroll(){ local apikeyId=$(echo $enrollResp | jq -r '.list[] | select((.name | startswith("Default ")) and (.active == true)) | .id') echo $apikeyId - if [[ -z "${$apikeyId}" ]]; then + if [[ -z "${apikeyId}" ]]; then echo "Default agent policy was not found. Please consider using own enrollment token (FLEET_ENROLLMENT_TOKEN)." exit 1 fi diff --git a/x-pack/elastic-agent/CHANGELOG.next.asciidoc b/x-pack/elastic-agent/CHANGELOG.next.asciidoc index fab0eb885222..670f3fc4177c 100644 --- a/x-pack/elastic-agent/CHANGELOG.next.asciidoc +++ b/x-pack/elastic-agent/CHANGELOG.next.asciidoc @@ -39,6 +39,7 @@ - Fix libbeat from reporting back degraded on config update {pull}23537[23537] - Fix issues with dynamic inputs and conditions {pull}23886[23886] - Select default agent policy if no enrollment token provided. {pull}23973[23973] +- Fix bad substitution of API key. {pull}24036[24036] ==== New features