Fixes #2839 - retry SSH authentication issues with cloud-init

(cherry picked from commit f9d5655583a9a9d0309fcd4bd19ac9b43021c7d1)
fixes #2837 add an interface to add repositories to kickstart

(cherry picked from commit 6b27556aafbd98f3a0f0bb092fbbc49a6bb587e1, minus cleanups)