FreeIPA configuration on provisioned Ubuntu Hosts

Problem:
When I provision a Ubuntu 18.04 server through Foreman it enrolls the host to FreeIPA but it seems that credentials aren’t configured correctly. Hosts provisioned with CentOS works without failure but I have to manually re-install freeipa clients for Ubuntu as they do not configure correctly

Looking to get Ubuntu clients to join freeIPA and configure correctly.

Using Version 1.20.2

Log information
So upon my investigation I found the following messages in the ipa-
client-install.log file. It seems the OTP isn’t being shared properly. Where can I look to find out why?

2019-07-01T16:36:02Z INFO Configured /etc/openldap/ldap.conf
2019-07-01T16:36:02Z INFO Principal is not set when enrolling with OTP; using principal 'admin@factory-tech.com' for 'getent passwd'
2019-07-01T16:36:02Z DEBUG Starting external process
2019-07-01T16:36:02Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:02Z DEBUG Process finished, return code=2
2019-07-01T16:36:02Z DEBUG stdout=
2019-07-01T16:36:02Z DEBUG stderr=
2019-07-01T16:36:03Z DEBUG Starting external process
2019-07-01T16:36:03Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:03Z DEBUG Process finished, return code=2
2019-07-01T16:36:03Z DEBUG stdout=
2019-07-01T16:36:03Z DEBUG stderr=
2019-07-01T16:36:04Z DEBUG Starting external process
2019-07-01T16:36:04Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:04Z DEBUG Process finished, return code=2
2019-07-01T16:36:04Z DEBUG stdout=
2019-07-01T16:36:04Z DEBUG stderr=
2019-07-01T16:36:05Z DEBUG Starting external process
2019-07-01T16:36:05Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:05Z DEBUG Process finished, return code=2
2019-07-01T16:36:05Z DEBUG stdout=
2019-07-01T16:36:05Z DEBUG stderr=
2019-07-01T16:36:06Z DEBUG Starting external process
2019-07-01T16:36:06Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:06Z DEBUG Process finished, return code=2
2019-07-01T16:36:06Z DEBUG stdout=
2019-07-01T16:36:06Z DEBUG stderr=
2019-07-01T16:36:07Z DEBUG Starting external process
2019-07-01T16:36:13Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:13Z DEBUG Process finished, return code=2
2019-07-01T16:36:13Z DEBUG stdout=
2019-07-01T16:36:13Z DEBUG stderr=
2019-07-01T16:36:14Z DEBUG Starting external process
2019-07-01T16:36:14Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:14Z DEBUG Process finished, return code=2
2019-07-01T16:36:14Z DEBUG stdout=
2019-07-01T16:36:14Z DEBUG stderr=
2019-07-01T16:36:15Z DEBUG Starting external process
2019-07-01T16:36:15Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:15Z DEBUG Process finished, return code=2
2019-07-01T16:36:15Z DEBUG stdout=
2019-07-01T16:36:15Z DEBUG stderr=
2019-07-01T16:36:16Z DEBUG Starting external process
2019-07-01T16:36:16Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:16Z DEBUG Process finished, return code=2
2019-07-01T16:36:16Z DEBUG stdout=
2019-07-01T16:36:16Z DEBUG stderr=
2019-07-01T16:36:17Z DEBUG Starting external process
2019-07-01T16:36:17Z DEBUG args=['/usr/bin/getent', 'passwd', 'admin@factory-tech.com']
2019-07-01T16:36:17Z DEBUG Process finished, return code=2
2019-07-01T16:36:17Z DEBUG stdout=
2019-07-01T16:36:17Z DEBUG stderr=
2019-07-01T16:36:18Z ERROR Unable to find 'admin' user with 'getent passwd admin@factory-tech.com'!
2019-07-01T16:36:18Z ERROR Unable to reliably detect configuration. Check NSS setup manually.
2019-07-01T16:36:18Z DEBUG Backing up system configuration file '/etc/ssh/ssh_config'
2019-07-01T16:36:18Z DEBUG Saving Index File to '/var/lib/ipa-client/sysrestore/sysrestore.index'
2019-07-01T16:36:18Z INFO Configured /etc/ssh/ssh_config
2019-07-01T16:36:18Z DEBUG Backing up system configuration file '/etc/ssh/sshd_config'
2019-07-01T16:36:18Z DEBUG Saving Index File to '/var/lib/ipa-client/sysrestore/sysrestore.index'
2019-07-01T16:36:18Z DEBUG Starting external process
2019-07-01T16:36:18Z DEBUG args=['/usr/sbin/sshd', '-t', '-f', '/dev/null', '-o', 'AuthorizedKeysCommand=/usr/bin/sss_ssh_authorizedkeys', '-o', 'AuthorizedKeysCommandUser=nobody']
2019-07-01T16:36:18Z DEBUG Process finished, return code=255
2019-07-01T16:36:18Z DEBUG stdout=
2019-07-01T16:36:18Z DEBUG stderr=Missing privilege separation directory: /run/sshd

2019-07-01T16:36:18Z DEBUG Starting external process
2019-07-01T16:36:18Z DEBUG args=['/usr/sbin/sshd', '-t', '-f', '/dev/null', '-o', 'AuthorizedKeysCommand=/usr/bin/sss_ssh_authorizedkeys', '-o', 'AuthorizedKeysCommandRunAs=nobody']
2019-07-01T16:36:18Z DEBUG Process finished, return code=1
2019-07-01T16:36:18Z DEBUG stdout=
2019-07-01T16:36:18Z DEBUG stderr=command-line: line 0: Bad configuration option: AuthorizedKeysCommandRunAs

2019-07-01T16:36:18Z DEBUG Starting external process
2019-07-01T16:36:18Z DEBUG args=['/usr/sbin/sshd', '-t', '-f', '/dev/null', '-o', 'PubKeyAgent=/usr/bin/sss_ssh_authorizedkeys %u', '-o', 'PubKeyAgentRunAs=nobody']
2019-07-01T16:36:18Z DEBUG Process finished, return code=1
2019-07-01T16:36:18Z DEBUG stdout=
2019-07-01T16:36:18Z DEBUG stderr=command-line: line 0: Bad configuration option: PubKeyAgent

2019-07-01T16:36:18Z WARNING Installed OpenSSH server does not support dynamically loading authorized user keys. Public key authentication of IPA users will not be available.
2019-07-01T16:36:18Z INFO Configured /etc/ssh/sshd_config
2019-07-01T16:36:18Z DEBUG Starting external process
2019-07-01T16:36:18Z DEBUG args=['/bin/systemctl', 'is-active', 'sshd.service']
2019-07-01T16:36:18Z DEBUG Process finished, return code=0
2019-07-01T16:36:18Z DEBUG stdout=
2019-07-01T16:36:18Z DEBUG stderr=Running in chroot, ignoring request: is-active

2019-07-01T16:36:18Z DEBUG Starting external process
2019-07-01T16:36:18Z DEBUG args=['/bin/systemctl', 'restart', 'sshd.service']
2019-07-01T16:36:18Z DEBUG Process finished, return code=0
2019-07-01T16:36:18Z DEBUG stdout=
2019-07-01T16:36:18Z DEBUG stderr=Running in chroot, ignoring request: restart

2019-07-01T16:36:18Z DEBUG Starting external process
2019-07-01T16:36:18Z DEBUG args=['/bin/systemctl', 'is-active', 'sshd.service']
2019-07-01T16:36:18Z DEBUG Process finished, return code=0
2019-07-01T16:36:18Z DEBUG stdout=
2019-07-01T16:36:18Z DEBUG stderr=Running in chroot, ignoring request: is-active