Foreman 3.16/katello 4.18 cloud init not completing

Somehow I missed Foreman 3.16 Finish script fails with an error - #4 by cody_c
Its partially fixing my issue as the system is at least registered to katello properly and other finish tasks are done too. There are still some errors but I need to investigate at on them.