factorize cloud-init stuff in the cloud role.