2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-12 18:59:06 +00:00

Redo ssh certs on firstboot for SUSE

For whatever reason, SUSE loses the certificate during firstboot.
This commit is contained in:
Jarrod Johnson 2021-05-03 16:47:24 -04:00
parent 763feda63b
commit 257edff3a7

View File

@ -11,6 +11,11 @@ proto=$(grep ^protocol: /etc/confluent/confluent.deploycfg |awk '{print $2}')
confluent_apikey=$(cat /etc/confluent/confluent.apikey)
. /etc/confluent/functions
for i in /etc/ssh/ssh_host*key.pub; do
certname=${i/.pub/-cert.pub}
curl -f -X POST -H "CONFLUENT_NODENAME: $nodename" -H "CONFLUENT_APIKEY: $(cat /etc/confluent/confluent.apikey)" -d @$i https://$confluent_mgr/confluent-api/self/sshcert > $certname
done
systemctl restart sshd
run_remote firstboot.custom
# Firstboot scripts may be placed into firstboot.d, e.g. firstboot.d/01-firstaction.sh, firstboot.d/02-secondaction.sh