diff --git a/pkg/cloud/services/secretsmanager/secret_fetch_script.go b/pkg/cloud/services/secretsmanager/secret_fetch_script.go index 4e3f09e8fe..de89e62a4b 100644 --- a/pkg/cloud/services/secretsmanager/secret_fetch_script.go +++ b/pkg/cloud/services/secretsmanager/secret_fetch_script.go @@ -231,6 +231,7 @@ if [ ${GUNZIP_RETURN} -ne 0 ]; then fi log::info "restarting cloud-init" -systemctl restart cloud-init +rm -rf /var/lib/cloud/instances +cloud-init clean --reboot log::success_exit ` diff --git a/pkg/cloud/services/ssm/secret_fetch_script.go b/pkg/cloud/services/ssm/secret_fetch_script.go index cc370ad01a..1953bb7f4c 100644 --- a/pkg/cloud/services/ssm/secret_fetch_script.go +++ b/pkg/cloud/services/ssm/secret_fetch_script.go @@ -196,6 +196,7 @@ if [ ${GUNZIP_RETURN} -ne 0 ]; then fi log::info "restarting cloud-init" -systemctl restart cloud-init +rm -rf /var/lib/cloud/instances +cloud-init clean --reboot log::success_exit `