run fleet ssl state in fleet.config to ensure all required certs are created before so-elastic-fleet-setup runs

This commit is contained in:
reyesj2
2026-01-28 15:23:38 -06:00
parent 36f8c490c8
commit ebeeb91297
3 changed files with 6 additions and 1 deletions
@@ -34,6 +34,11 @@ if [[ "$RETURN_CODE" != "0" ]]; then
exit 1
fi
if [[ ! -f /etc/pki/elasticfleet-kafka.crt || ! -f /etc/pki/elasticfleet-kafka.key ]]; then
echo -e "\nKafka certificates not found, can't setup Elastic Fleet output policy for Kafka...\n"
exit 1
fi
KAFKACRT=$(openssl x509 -in /etc/pki/elasticfleet-kafka.crt)
KAFKAKEY=$(openssl rsa -in /etc/pki/elasticfleet-kafka.key)
KAFKACA=$(openssl x509 -in /etc/pki/tls/certs/intca.crt)